summary refs log tree commit diff stats
path: root/rod
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-laptop>2010-07-22 00:02:08 +0200
committerAndreas Rumpf <andreas@andreas-laptop>2010-07-22 00:02:08 +0200
commit2b212851441d58d4dd5beb53c1572b652dc04929 (patch)
tree649751a36d3096d894028d42b21b8464d967562c /rod
parent202d229fdf62600e1247b0ba07fa5f30aed06063 (diff)
downloadNim-2b212851441d58d4dd5beb53c1572b652dc04929.tar.gz
bugfix: c2nim: typedef unsigned char
Diffstat (limited to 'rod')
-rwxr-xr-xrod/c2nim/cparse.nim2
-rw-r--r--rod/c2nim/tests/systest.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/rod/c2nim/cparse.nim b/rod/c2nim/cparse.nim
index f5e6c95f8..b0f2a3e3d 100755
--- a/rod/c2nim/cparse.nim
+++ b/rod/c2nim/cparse.nim
@@ -376,7 +376,7 @@ proc typeAtom(p: var TParser): PNode =
   elif isIntType(p.tok.s):
     var x = "c" & p.tok.s
     getTok(p, nil)
-    while p.tok.xkind == pxSymbol and isIntType(p.tok.s):
+    while p.tok.xkind == pxSymbol and (isIntType(p.tok.s) or p.tok.s == "char"):
       add(x, p.tok.s)
       getTok(p, nil)
     result = newIdentNodeP(x, p)
diff --git a/rod/c2nim/tests/systest.c b/rod/c2nim/tests/systest.c
index 022bf8350..528ae89e3 100644
--- a/rod/c2nim/tests/systest.c
+++ b/rod/c2nim/tests/systest.c
@@ -9,6 +9,7 @@ extern "C" {
 
 typedef char gchar;
 typedef unsigned int gunsignedint;
+typedef unsigned char guchar;
 
 point* newPoint(void) {  
   for (int i = 0; i < 89; ++i) echo("test" " string "  "concatenation");