Handle enumerations with the full range of signed and unsigned values
authorOwen W. Taylor <otaylor@fishsoup.net>
Tue, 14 Sep 2010 15:59:03 +0000 (11:59 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Mon, 1 Nov 2010 21:25:45 +0000 (17:25 -0400)
commit8916db0a3831cb5e6c3b714125f7596f43d6aa6a
treec4d523a925a666be85bfdaea804407ca782778f7
parent29ec4294d9232dcfd7cfec4e20c0e302a5ff3e80
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
15 files changed:
girepository/gienuminfo.c
girepository/gienuminfo.h
girepository/gifieldinfo.c
girepository/girnode.c
girepository/girnode.h
girepository/girparser.c
girepository/girwriter.c
girepository/gitypelib-internal.h
giscanner/gdumpparser.py
giscanner/giscannermodule.c
giscanner/scannerparser.y
giscanner/sourcescanner.h
tests/scanner/Regress-1.0-expected.gir
tests/scanner/regress.c
tests/scanner/regress.h