summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-05-05 14:53:21 -0400
committerColin Walters <walters@verbum.org>2013-05-07 09:12:17 -0400
commit0cbfb74484ee49d568651d560783d83fa3c19ad7 (patch)
tree26a7b858d8ee581514ceb55172ca73a31682028a
parenta29101c61598ff08e46a06378e52176db7e50101 (diff)
downloadgobject-introspection-0cbfb74484ee49d568651d560783d83fa3c19ad7.tar.gz
scanner: Parse __int128 and friends as "int"
This is a hack, but all we really want to do is ignore them for now. See https://mail.gnome.org/archives/gtk-devel-list/2013-May/msg00013.html https://bugzilla.gnome.org/show_bug.cgi?id=699722
-rw-r--r--giscanner/scannerlexer.l4
-rw-r--r--tests/scanner/Regress-1.0-expected.gir7
-rw-r--r--tests/scanner/regress.h7
3 files changed, 18 insertions, 0 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index f8fd3703..554e2da7 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -177,6 +177,10 @@ stringtext ([^\\\"])|(\\.)
"if" { return IF; }
"inline" { return INLINE; }
"int" { return INT; }
+"__uint128_t" { return INT; }
+"__int128_t" { return INT; }
+"__uint128" { return INT; }
+"__int128" { return INT; }
"long" { return LONG; }
"register" { return REGISTER; }
"restrict" { return RESTRICT; }
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 0dadc59c..c4d196dc 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -1946,6 +1946,13 @@ exposed to language bindings.</doc>
<type name="gdouble" c:type="double"/>
</field>
</record>
+ <record name="LikeLinuxArmUAPI" c:type="RegressLikeLinuxArmUAPI">
+ <field name="vregs" writable="1">
+ <array zero-terminated="0" c:type="int" fixed-size="32">
+ <type name="gint" c:type="int"/>
+ </array>
+ </field>
+ </record>
<record name="LikeXklConfigItem" c:type="RegressLikeXklConfigItem">
<field name="name" writable="1">
<array zero-terminated="0" c:type="gchar" fixed-size="32">
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
index adc05dbc..109c4fcd 100644
--- a/tests/scanner/regress.h
+++ b/tests/scanner/regress.h
@@ -7,6 +7,8 @@
#include <glib-object.h>
#include <gio/gio.h>
#include <time.h>
+#include <string.h>
+#include <stdlib.h>
void regress_set_abort_on_error (gboolean abort_on_error);
@@ -948,4 +950,9 @@ typedef struct {
#define REGRESS_MININT64 ((gint64) G_GINT64_CONSTANT(0x8000000000000000))
#define REGRESS_MAXUINT64 (G_GINT64_CONSTANT(0xffffffffffffffffU))
+/* https://mail.gnome.org/archives/gtk-devel-list/2013-May/msg00008.html */
+typedef struct {
+ __uint128_t vregs[32];
+} RegressLikeLinuxArmUAPI;
+
#endif /* __GITESTTYPES_H__ */