distinguish between 'defined' and 'declared'
This commit is contained in:
parent
b1c8461a3b
commit
dd806cafa0
36 changed files with 155 additions and 96 deletions
|
|
@ -10,7 +10,7 @@
|
|||
# Nimrod support for C/C++'s `wide strings`:idx:. This is part of the system
|
||||
# module! Do not import it directly!
|
||||
|
||||
when not defined(NimString):
|
||||
when not declared(NimString):
|
||||
{.error: "You must not import this module explicitly".}
|
||||
|
||||
type
|
||||
|
|
@ -103,7 +103,7 @@ proc newWideCString*(source: cstring, L: int): WideCString =
|
|||
proc newWideCString*(s: cstring): WideCString =
|
||||
if s.isNil: return nil
|
||||
|
||||
when not defined(c_strlen):
|
||||
when not declared(c_strlen):
|
||||
proc c_strlen(a: cstring): int {.
|
||||
header: "<string.h>", noSideEffect, importc: "strlen".}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue