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 603812 - Incorrect member names for enum values
Incorrect member names for enum values
Status: RESOLVED NOTABUG
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-12-04 19:17 UTC by Adam Schreiber
Modified: 2015-02-07 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Generated gir file (47.06 KB, application/octet-stream)
2009-12-04 19:17 UTC, Adam Schreiber
Details
header file in question (5.51 KB, application/octet-stream)
2009-12-04 19:23 UTC, Adam Schreiber
Details

Description Adam Schreiber 2009-12-04 19:17:32 UTC
Created attachment 149110 [details]
Generated gir file

In seahorse, libcryptui/cryptui.h there's an enum:

/**
 * CryptUIEncType:
 * @CRYPTUI_ENCTYPE_NONE: the key is none of the below types
 * @CRYPTUI_ENCTYPE_SYMMETRIC: the key's type is symmetric
 * @CRYPTUI_ENCTYPE_PUBLIC: the key's type is public
 * @CRYPTUI_ENCTYPE_PRIVATE: the key's type is private
 * @_CRYPTUI_ENCTYPE_MAXVALUE: for internal use only
 *
 * Used in key properties to indicate what kind of key it is
 *
 * Never ever change a values already present. These values are used
 * across applications, DBus etc... 
 */
typedef enum {
    CRYPTUI_ENCTYPE_NONE =       0,
    CRYPTUI_ENCTYPE_SYMMETRIC =  1,
    CRYPTUI_ENCTYPE_PUBLIC =     2,
    CRYPTUI_ENCTYPE_PRIVATE =    3,
    
    /* Used internally */
    _CRYPTUI_ENCTYPE_MAXVALUE
} CryptUIEncType;

That gets scanned and placed into the gir file as:

<enumeration name="EncType"
                 doc="Used in key properties to indicate what kind of key it is
Never ever change a values already present. These values are used
across applications, DBus etc..."
                 c:type="CryptUIEncType">
      <member name="ryptui_enctype_none"
              value="0"
              c:identifier="CRYPTUI_ENCTYPE_NONE"/>
      <member name="ryptui_enctype_symmetric"
              value="1"
              c:identifier="CRYPTUI_ENCTYPE_SYMMETRIC"/>
      <member name="ryptui_enctype_public"
              value="2"
              c:identifier="CRYPTUI_ENCTYPE_PUBLIC"/>
      <member name="ryptui_enctype_private"
              value="3"
              c:identifier="CRYPTUI_ENCTYPE_PRIVATE"/>
      <member name="cryptui_enctype_maxvalue"
              value="4"
              c:identifier="_CRYPTUI_ENCTYPE_MAXVALUE"/>
    </enumeration>

The member names are wrong.  The patch for seahorse hasn't been committed yet.
Comment 1 Johan (not receiving bugmail) Dahlin 2009-12-04 19:19:21 UTC
Which version of gobject-introspection? This was recently fixed/changed in git.
Comment 2 Adam Schreiber 2009-12-04 19:23:16 UTC
Created attachment 149112 [details]
header file in question
Comment 3 Adam Schreiber 2009-12-04 20:08:21 UTC
git master, I built it this morning and just checked and was still up to date.
Comment 4 Johan (not receiving bugmail) Dahlin 2009-12-05 11:28:44 UTC
The problem is the _CRYPTUI_ENCTYPE_MAXVALUE enum.
If you remove that it'll work just fine. We don't really support that style in the scanner.
Comment 5 Adam Schreiber 2009-12-05 16:11:29 UTC
I can remove the underscore since that value doesn't appear in any C files yet.  Is it really that non-standard of a construction?
Comment 6 Johan (not receiving bugmail) Dahlin 2009-12-06 20:28:03 UTC
Yes, that kind of construct is not used anywhere inside any GNOME libraries as far as I know.
Comment 7 Adam Schreiber 2009-12-08 02:33:52 UTC
Changed.
Comment 8 André Klapper 2015-02-07 16:54:17 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]