Commit 18d805d8468bdfc87ead90bd2bed222c4edcbbc7
1 parent
314717f0
squeaknim can deal with arrays
Showing
1 changed file
with
3 additions
and
0 deletions
src/squeaknim.nim
@@ -103,6 +103,9 @@ proc mapTypeToC(symbolicType: NimNode): string {.compileTime.} = | @@ -103,6 +103,9 @@ proc mapTypeToC(symbolicType: NimNode): string {.compileTime.} = | ||
103 | of ntyPtr, ntyVar: | 103 | of ntyPtr, ntyVar: |
104 | expectKind t, nnkBracketExpr | 104 | expectKind t, nnkBracketExpr |
105 | result = mapTypeToC(t[1]) & "*" | 105 | result = mapTypeToC(t[1]) & "*" |
106 | + of ntyArray: | ||
107 | + expectKind t, nnkBracketExpr | ||
108 | + result = mapTypeToC(t[2]) & "*" | ||
106 | of ntyCString: result = "char*" | 109 | of ntyCString: result = "char*" |
107 | of ntyPointer: result = "void*" | 110 | of ntyPointer: result = "void*" |
108 | of ntyInt: result = intType | 111 | of ntyInt: result = intType |