After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 635128 - [regression] [with patch] GIArgument is getting exported as _Argument
[regression] [with patch] GIArgument is getting exported as _Argument
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
: 630509 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-11-18 00:11 UTC by Alan Knowles
Modified: 2015-02-07 17:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make argument introspectable again, so that docs can be generated (604 bytes, patch)
2011-01-14 13:14 UTC, Alan Knowles
none Details | Review
GIArgument fix + remove skip on constant_info_get_value, fix warning (1.49 KB, patch)
2011-01-16 11:08 UTC, Alan Knowles
none Details | Review
GIArgument fix + remove skip on constant_info_get_value, fix warning (1.49 KB, patch)
2011-01-16 11:24 UTC, Alan Knowles
needs-work Details | Review
GIArgument fix + remove skip on constant_info_get_value, fix warning (1.49 KB, patch)
2011-01-16 13:46 UTC, Alan Knowles
reviewed Details | Review
fixes the giargument issue only (786 bytes, patch)
2012-06-28 15:47 UTC, Alan Knowles
reviewed Details | Review
revised with cuter commit message. (835 bytes, patch)
2012-06-28 16:04 UTC, Alan Knowles
committed Details | Review

Description Alan Knowles 2010-11-18 00:11:46 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">
Comment 1 Alan Knowles 2011-01-14 13:14:25 UTC
Created attachment 178311 [details] [review]
make argument introspectable again, so that docs can be generated
Comment 2 Alan Knowles 2011-01-16 11:08:25 UTC
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.
Comment 3 Alan Knowles 2011-01-16 11:24:20 UTC
Created attachment 178437 [details] [review]
GIArgument fix + remove skip on constant_info_get_value, fix warning

fixed typo
Comment 4 Pavel Holejsovsky 2011-01-16 12:59:10 UTC
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;
Comment 5 Alan Knowles 2011-01-16 13:37:26 UTC
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
Comment 6 Alan Knowles 2011-01-16 13:46:49 UTC
Created attachment 178440 [details] [review]
GIArgument fix + remove skip on constant_info_get_value, fix warning

Fixed utf8 code as an element type.
Comment 7 Pavel Holejsovsky 2011-01-19 09:27:22 UTC
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.
Comment 8 Colin Walters 2012-06-28 15:32:25 UTC
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.
Comment 9 Alan Knowles 2012-06-28 15:47:24 UTC
Created attachment 217538 [details] [review]
fixes the giargument issue only
Comment 10 Colin Walters 2012-06-28 16:00:25 UTC
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!
Comment 11 Alan Knowles 2012-06-28 16:04:04 UTC
Created attachment 217545 [details] [review]
revised with cuter commit message.
Comment 12 Emmanuele Bassi (:ebassi) 2013-08-26 10:39:28 UTC
*** Bug 630509 has been marked as a duplicate of this bug. ***
Comment 13 André Klapper 2015-02-07 17:01:00 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]