GNOME Bugzilla – Bug 635128
[regression] [with patch] GIArgument is getting exported as _Argument
Last modified: 2015-02-07 17:01:00 UTC
Gir output. <union name="_Argument" c:type="_GIArgument"> <field name="v_boolean" writable="1"> <type name="gboolean" c:type="gboolean"/> </field> <field name="v_int8" writable="1"> <type name="gint8" c:type="gint8"/> </field> The knock on effect from this is that constant_info_get_value becomes un-introspectable as it can not resolve Argument. <function name="constant_info_get_value" c:identifier="g_constant_info_get_value" introspectable="0">
Created attachment 178311 [details] [review] make argument introspectable again, so that docs can be generated
Created attachment 178436 [details] [review] GIArgument fix + remove skip on constant_info_get_value, fix warning Getting closer to enabling the documentation tools to work.
Created attachment 178437 [details] [review] GIArgument fix + remove skip on constant_info_get_value, fix warning fixed typo
Review of attachment 178437 [details] [review]: I can't approve/reject it, so only a few comments... ::: girepository/girepository.c @@ +692,3 @@ * Return the list of currently loaded namespaces. * + * Returns: (type utf8): (transfer full): List of namespaces This is incorrect, because it declares that only one string is returned. Correct declarations in this case is Returns: (array zero-terminated=1) (transfer full): List of namespaces The element type of the array (utf8 in this case) is inferred automatically by scanner. ::: girepository/gitypes.h @@ -189,3 @@ gpointer v_pointer; -}; -typedef union _GIArgument GIArgument; I would leave _GIArgument in. I'm afraid (but not sure) that scanner will generate GIArgument as an alias instead of union. I suggest using following pattern instead: /** * GIArgument: ... */ union _GIArgument { ... }; typedef union _GIArgument GIArgument;
I'll fix the utf8 - that was just found when I was debugging - it's currently emited as a warning. For the GIArgument - this is the real bug - using the way it is / and the suggestion, results in a broken gir file (no alias or anything) and any code using it failing to get generated. https://github.com/roojs/gir-1.2-gtk-2.0/blob/d0a87fb1696a160a2e01bef0c76e3e2fb7cbb22b/GIRepository-2.0.gir
Created attachment 178440 [details] [review] GIArgument fix + remove skip on constant_info_get_value, fix warning Fixed utf8 code as an element type.
Review of attachment 178440 [details] [review]: Ok, after some experiments I proved myself wrong, your patch generates correct .gir file and I was not able to persuade scanner to DTRT with my approach, i.e. leave union _GIArgument in. The patch is GTG from me, but I don't have review power :-). You will have to catch someone else, probably walters or jdahlin.
Review of attachment 178440 [details] [review]: Yeah, sadly the scanner parsing of structs/unions is only happy with some forms...I tried to fix it once but it's a mess =/ ::: girepository/girepository.c @@ +692,3 @@ * Return the list of currently loaded namespaces. * + * Returns: (element-type utf8) (transfer full): List of namespaces This should be a separate patch, please.
Created attachment 217538 [details] [review] fixes the giargument issue only
Review of attachment 217538 [details] [review]: One more bit - can you make the commit message look like the others? In particular instead of "fix #636128", the bug link should be at the bottom. Run "git log" for examples, or see https://live.gnome.org/GnomeLove/SubmittingPatches And thank you for the patch!
Created attachment 217545 [details] [review] revised with cuter commit message.
*** Bug 630509 has been marked as a duplicate of this bug. ***
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]