Re: avoiding relocations in type registration
- From: Tim Janik <timj imendio com>
- To: Matthias Clasen <mclasen redhat com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: avoiding relocations in type registration
- Date: Fri, 21 Apr 2006 15:25:10 +0200 (CEST)
On Fri, 21 Apr 2006, Matthias Clasen wrote:
On 4/21/06, Tim Janik <timj imendio com> wrote:
g_type_register_static_simple (GType parent_type,
const gchar *type_name,
can you make this a guint instead?
and this? i don't think restricting to guint16 here really buys us anything.
sure, I'll change it. I was just copying the types from GTypeInfo.
The current trivial implementation fills a GTypeInfo struct on the
stack, but it should be possible to avoid the use of a struct
you mean inside g_type_register_static_simple? i don't see what's
wrong with the way you did it, i'd leave it as that.
What I meant is that check_type_info_I and type_data_make_W poke all
the fields out of the info struct again; it is not kept around after the node
is constructed. Thus one could avoid setting up the struct in the first place
and pass the fields directly to that check_type_info_I and type_data_make_W.
But 'm fine with keeping the current approach.
one could, yes. but i don't see the point in that, given that
g_type_register_static() is already written and will have to be
] [Thread Prev