summary refs log tree commit diff stats
path: root/rod/c2nim
diff options
context:
space:
mode:
Diffstat (limited to 'rod/c2nim')
-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");