[gobject-introspection] scanner: Support the C99 'bool' type
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] scanner: Support the C99 'bool' type
- Date: Wed, 4 Mar 2015 15:38:27 +0000 (UTC)
commit 62c634abface49f5ed1253acc5bdaf0fa2853d8f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Mar 4 15:03:35 2015 +0000
scanner: Support the C99 'bool' type
Otherwise API using it will badly break in weird ways.
https://bugzilla.gnome.org/show_bug.cgi?id=745608
giscanner/ast.py | 2 ++
giscanner/scannerlexer.l | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/ast.py b/giscanner/ast.py
index c3c83d4..12f273e 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -284,6 +284,8 @@ type_names['int32_t'] = TYPE_INT32
type_names['uint32_t'] = TYPE_UINT32
type_names['int64_t'] = TYPE_INT64
type_names['uint64_t'] = TYPE_UINT64
+# C99 stdbool
+type_names['bool'] = TYPE_BOOLEAN
# A few additional GLib type aliases
type_names['guchar'] = TYPE_UINT8
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index e35e9d5..835b92c 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -193,6 +193,7 @@ stringtext ([^\\\"])|(\\.)
"asm" { if (!parse_ignored_macro()) REJECT; }
"auto" { return AUTO; }
+"bool" { return BOOL; }
"break" { return BREAK; }
"case" { return CASE; }
"char" { return CHAR; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]