distinguish between 'defined' and 'declared'

This commit is contained in:
Araq 2014-08-11 20:38:28 +02:00
commit dd806cafa0
36 changed files with 155 additions and 96 deletions

View file

@ -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".}