Skip to content

Commit baa12be

Browse files
committed
Revert "Make c2nim compile again (#129)"
This reverts commit 9f05d97.
1 parent 9f05d97 commit baa12be

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

clex.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ type
104104
next*: ref Token # for C we need arbitrary look-ahead :-(
105105

106106
Lexer* = object of TBaseLexer
107-
fileIdx*: FileIndex
107+
fileIdx*: int32
108108
inDirective, debugMode*: bool
109109

110110
proc getTok*(L: var Lexer, tok: var Token)

cparse.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ proc sdbmHash(s: string): FilenameHash =
726726

727727
proc hashPosition(p: Parser): string =
728728
let lineInfo = parLineInfo(p)
729-
let fileInfo = fileInfos[lineInfo.fileIndex.int32]
729+
let fileInfo = fileInfos[lineInfo.fileIndex]
730730
result = $sdbmHash(fileInfo.shortName & "_" & $lineInfo.line & "_" &
731731
$lineInfo.col)
732732

testsuite/results/systest.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ proc newPoint*(): ptr point =
156156
var x: ptr mytype = y * z
157157
if p[][] == ' ':
158158
dec(p)
159-
elif p[][] == '\t':
159+
elif p[][] == '\x09':
160160
inc(p, 3)
161161
else:
162162
p = 45 + cast[ptr mytype](45)
@@ -225,7 +225,7 @@ proc IupConvertXYToPos*(ih: PIhandle; x: cint; y: cint): cint {.cdecl,
225225
importc: "IupConvertXYToPos", dynlib: iupdll.}
226226
when defined(DEBUG):
227227
template OUT*(x: untyped): untyped =
228-
printf("%s\n", x)
228+
printf("%s\x0A", x)
229229

230230
else:
231231
template OUT*(x: untyped): void =
@@ -244,7 +244,7 @@ var x* {.importc: "x", dynlib: iupdll.}: ptr cint
244244
const
245245
abc* = 34
246246
xyz* = 42
247-
wuseldusel* = "my string\nconstant"
247+
wuseldusel* = "my string\x0Aconstant"
248248

249249
var x* {.importc: "x", dynlib: iupdll.}: cstring
250250

testsuite/results/vincent.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ proc main*(): cint =
3232
printf("1")
3333
else:
3434
printf("2")
35-
return '\x00'
35+
return '\0'

0 commit comments

Comments
 (0)