summaryrefslogtreecommitdiff
path: root/giscanner/scannerparser.y
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2008-10-11 20:43:21 +0000
committerJürg Billeter <juergbi@src.gnome.org>2008-10-11 20:43:21 +0000
commit59011ffa9f2d12cb0c087f451b5918be98d6022e (patch)
tree2c4c43fa7ece3b7835f2d7ac2dfe68f9ff91183d /giscanner/scannerparser.y
parent0be08ed820506a63b5a9342d52d695f977934145 (diff)
downloadgobject-introspection-59011ffa9f2d12cb0c087f451b5918be98d6022e.tar.gz
Bug 552370: unsigned not scanned properly
2008-10-11 Jürg Billeter <j@bitron.ch> Bug 552370: unsigned not scanned properly * giscanner/scannerparser.y: combine basic types such as unsigned int and long long when scanning * tests/scanner/foo-expected.gir: * tests/scanner/foo.c: (foo_test_unsigned): * tests/scanner/foo.h: test that svn path=/trunk/; revision=666
Diffstat (limited to 'giscanner/scannerparser.y')
-rw-r--r--giscanner/scannerparser.y10
1 files changed, 9 insertions, 1 deletions
diff --git a/giscanner/scannerparser.y b/giscanner/scannerparser.y
index 53a30a31..43a5ae0d 100644
--- a/giscanner/scannerparser.y
+++ b/giscanner/scannerparser.y
@@ -559,7 +559,15 @@ declaration_specifiers
| type_specifier declaration_specifiers
{
$$ = $1;
- $$->base_type = $2;
+ /* combine basic types like unsigned int and long long */
+ if ($$->type == CTYPE_BASIC_TYPE && $2->type == CTYPE_BASIC_TYPE) {
+ char *name = g_strdup_printf ("%s %s", $$->name, $2->name);
+ g_free ($$->name);
+ $$->name = name;
+ ctype_free ($2);
+ } else {
+ $$->base_type = $2;
+ }
}
| type_specifier
| type_qualifier declaration_specifiers