diff options
author | Andreas Rumpf <andreas@andreas-laptop> | 2010-07-21 22:09:50 +0200 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-laptop> | 2010-07-21 22:09:50 +0200 |
commit | 202d229fdf62600e1247b0ba07fa5f30aed06063 (patch) | |
tree | 9706e9952ae573052836a1b638b2bb03db5485dd /rod | |
parent | cdf03b06b93d8bf5023d7c4b38a761675a20d514 (diff) | |
download | Nim-202d229fdf62600e1247b0ba07fa5f30aed06063.tar.gz |
bugfix: c2nim: typedef a b;
Diffstat (limited to 'rod')
-rwxr-xr-x | rod/c2nim/cparse.nim | 1 | ||||
-rw-r--r-- | rod/c2nim/tests/systest.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/rod/c2nim/cparse.nim b/rod/c2nim/cparse.nim index b637bfa61..f5e6c95f8 100755 --- a/rod/c2nim/cparse.nim +++ b/rod/c2nim/cparse.nim @@ -583,6 +583,7 @@ proc otherTypeDef(p: var TParser, section, typ: PNode) = name = skipIdent(p) else: # typedef typ name; + t = typ name = skipIdent(p) t = parseTypeSuffix(p, t) addTypeDef(section, name, t) diff --git a/rod/c2nim/tests/systest.c b/rod/c2nim/tests/systest.c index 7983d9e1c..022bf8350 100644 --- a/rod/c2nim/tests/systest.c +++ b/rod/c2nim/tests/systest.c @@ -7,6 +7,9 @@ extern "C" { #endif +typedef char gchar; +typedef unsigned int gunsignedint; + point* newPoint(void) { for (int i = 0; i < 89; ++i) echo("test" " string " "concatenation"); for (; j < 54; j++) {} |