diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2010-09-14 11:59:03 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2010-11-01 17:25:45 -0400 |
commit | 8916db0a3831cb5e6c3b714125f7596f43d6aa6a (patch) | |
tree | c4d523a925a666be85bfdaea804407ca782778f7 /girepository/gitypelib-internal.h | |
parent | 29ec4294d9232dcfd7cfec4e20c0e302a5ff3e80 (diff) | |
download | gobject-introspection-8916db0a3831cb5e6c3b714125f7596f43d6aa6a.tar.gz |
Handle enumerations with the full range of signed and unsigned values
The C compiler will pick an enumeration type that accomodates the specified
values for the enumeration, so ignoring 64-bit enumerations, we can
have enumeration values from MININT32 to MAXUINT32. To handle this properly:
- Use gint64 for holding eumeration values when scanning
- Add a 'unsigned_value' bit to ValueBlob so we can distinguish the
int32 vs. uint32 cases in the typelib
- Change the return value of g_value_info_get_value() to gint64.
https://bugzilla.gnome.org/show_bug.cgi?id=629704
Diffstat (limited to 'girepository/gitypelib-internal.h')
-rw-r--r-- | girepository/gitypelib-internal.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/girepository/gitypelib-internal.h b/girepository/gitypelib-internal.h index 26fd6bfb..de2f131b 100644 --- a/girepository/gitypelib-internal.h +++ b/girepository/gitypelib-internal.h @@ -632,6 +632,7 @@ typedef struct { /** * ValueBlob: * @deprecated: Whether this value is deprecated + * @unsigned_value: if set, value is a 32-bit unsigned integer cast to gint32 * @value: The numerical value * @name: Name of blob * @@ -639,8 +640,9 @@ typedef struct { */ typedef struct { guint32 deprecated : 1; + guint32 unsigned_value : 1; /* <private> */ - guint32 reserved :31; + guint32 reserved :30; /* <public> */ guint32 name; gint32 value; |