X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/926b8d8fb3ecffe60f3eaefcd5ec40a5273251ce..1aa75d411dd68f6e015a747a39b5179cb5573bb8:/src/main.c diff --git a/src/main.c b/src/main.c index 81b22f1..295199c 100644 --- a/src/main.c +++ b/src/main.c @@ -3907,7 +3907,7 @@ print_class_block(Class *c) " * Public methods\n" " */\n"); - if (!overrode_get_type) { + if (!overrode_get_type && !no_gnu) { /* * For ordinary "static" types it should be safe to mark the * get_type implementation as const, since the get_type @@ -4315,7 +4315,8 @@ print_enum (EnumDef *enode) g_free (str); out_printf (outh, "%s_get_type()\n", funcprefix); - out_printf (outh, "GType %s_get_type (void) G_GNUC_CONST;\n\n", funcprefix); + out_printf (outh, "GType %s_get_type (void)%s;\n\n", + funcprefix, no_gnu ? "": " G_GNUC_CONST"); out_printf (out, "GType\n%s_get_type (void)\n" @@ -4380,7 +4381,8 @@ print_flags (Flags *fnode) g_free (str); out_printf (outh, "%s_get_type()\n", funcprefix); - out_printf (outh, "GType %s_get_type (void) G_GNUC_CONST;\n\n", funcprefix); + out_printf (outh, "GType %s_get_type (void)%s;\n\n", + funcprefix, no_gnu ? "" : " G_GNUC_CONST"); out_printf (out, "GType\n%s_get_type (void)\n" @@ -4443,7 +4445,8 @@ print_error (Error *enode) g_free (str); out_printf (outh, "%s_get_type ()\n", funcprefix); - out_printf (outh, "GType %s_get_type (void) G_GNUC_CONST;\n\n", funcprefix); + out_printf (outh, "GType %s_get_type (void)%s;\n\n", + funcprefix, no_gnu ? "" : " G_GNUC_CONST"); out_printf (out, "GType\n%s_get_type (void)\n"