static int protecteds = 0; /* number of protected methods */
static int destructors = 0; /* number of variable destructors */
static int initializers = 0; /* number of variable initializers */
+static gboolean overrode_get_type = FALSE; /* provided your won _get_type */
static gboolean made_aliases = FALSE; /* if we made any shorthand aliases
and need the REALLY UGLY HACK to
"GtkType\n"
"%s_get_type (void)\n"
"{\n"
- "\tstatic guint type = 0;\n\n"
- "\tif ( ! type) {\n"
+ "\tstatic GtkType type = 0;\n\n"
+ "\tif (type == 0) {\n"
"\t\tstatic const GtkTypeInfo info = {\n"
"\t\t\t\"%s\",\n"
"\t\t\tsizeof (%s),\n"
add_enums(c);
- add_get_type();
+ if ( ! overrode_get_type)
+ add_get_type();
if(any_method_to_alias(c)) {
if( ! no_gnu) {
protecteds = count_protecteds((Class *)class);
destructors = count_destructors((Class *)class);
initializers = count_initializers((Class *)class);
+ overrode_get_type = find_get_type((Class *)class);
make_bases();
make_inits((Class *)class);