summaryrefslogtreecommitdiff
path: root/tests/scanner/Regress-1.0-expected.gir
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-11-06 11:48:36 -0500
committerColin Walters <walters@verbum.org>2012-11-12 11:43:09 -0500
commitac7376e0b2671ac6cb12c69b0289e029a3c2302b (patch)
treedde072db0d69568ab9d027b35599ff28fcaaa20f /tests/scanner/Regress-1.0-expected.gir
parent75148f33bbff9eed6164c0c02c584916fd127396 (diff)
downloadgobject-introspection-ac7376e0b2671ac6cb12c69b0289e029a3c2302b.tar.gz
scanner: Correctly handle large 64 bit integer constants
In C, positive integer constants are by default unsigned. This means an expression like 0x8000000000000000 will be "unsigned long long". In the actual scanner code, we were parsing them as "gint64", and storing them as gint64. This was incorrect; we need to parse them as guint64, and store the bits we get from that. This gives us an equivalent result to what the C compiler does. However, when we actually return the value as a Python "long" (arbitrary length integer), we need to treat the value as unsigned if the result indicated it was. https://bugzilla.gnome.org/show_bug.cgi?id=685022 Conflicts: tests/scanner/Regress-1.0-expected.gir tests/scanner/regress.h
Diffstat (limited to 'tests/scanner/Regress-1.0-expected.gir')
-rw-r--r--tests/scanner/Regress-1.0-expected.gir15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 8d123f7a..1adc5caf 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -87,11 +87,26 @@ and/or use gtk-doc annotations. -->
<type name="gdouble" c:type="double"/>
</field>
</record>
+ <constant name="MAXUINT64"
+ value="18446744073709551615"
+ c:type="REGRESS_MAXUINT64">
+ <type name="guint64" c:type="guint64"/>
+ </constant>
+ <constant name="MININT64"
+ value="-9223372036854775808"
+ c:type="REGRESS_MININT64">
+ <type name="gint64" c:type="gint64"/>
+ </constant>
<constant name="Mixed_Case_Constant"
value="4423"
c:type="REGRESS_Mixed_Case_Constant">
<type name="gint" c:type="gint"/>
</constant>
+ <constant name="NEGATIVE_INT_CONSTANT"
+ value="-42"
+ c:type="REGRESS_NEGATIVE_INT_CONSTANT">
+ <type name="gint" c:type="gint"/>
+ </constant>
<constant name="STRING_CONSTANT"
value="Some String"
c:type="REGRESS_STRING_CONSTANT">