[gobject-introspection] scanner: Parse __int128 and friends as "int"
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] scanner: Parse __int128 and friends as "int"
- Date: Tue, 7 May 2013 13:12:25 +0000 (UTC)
commit 0cbfb74484ee49d568651d560783d83fa3c19ad7
Author: Colin Walters <walters verbum org>
Date: Sun May 5 14:53:21 2013 -0400
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
giscanner/scannerlexer.l | 4 ++++
tests/scanner/Regress-1.0-expected.gir | 7 +++++++
tests/scanner/regress.h | 7 +++++++
3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index f8fd370..554e2da 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 0dadc59..c4d196d 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 adc05db..109c4fc 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__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]