diff options
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/lib/system.nim b/lib/system.nim index 7917f7d5b..dc5a406d1 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -999,11 +999,17 @@ type ## platform-dependant in general. when defined(windows): - type clong* {.importc: "long", nodecl.} = int32 - ## This is the same as the type ``long`` in *C*. + type + clong* {.importc: "long", nodecl.} = int32 + ## This is the same as the type ``long`` in *C*. + culong* {.importc: "unsigned long", nodecl.} = uint32 + ## This is the same as the type ``unsigned long`` in *C*. else: - type clong* {.importc: "long", nodecl.} = int - ## This is the same as the type ``long`` in *C*. + type + clong* {.importc: "long", nodecl.} = int + ## This is the same as the type ``long`` in *C*. + culong* {.importc: "unsigned long", nodecl.} = uint + ## This is the same as the type ``unsigned long`` in *C*. type # these work for most platforms: cchar* {.importc: "char", nodecl.} = char @@ -1032,8 +1038,6 @@ type # these work for most platforms: ## This is the same as the type ``unsigned short`` in *C*. cuint* {.importc: "int", nodecl.} = uint32 ## This is the same as the type ``unsigned int`` in *C*. - culong* {.importc: "unsigned long", nodecl.} = uint - ## This is the same as the type ``unsigned long`` in *C*. culonglong* {.importc: "unsigned long long", nodecl.} = uint64 ## This is the same as the type ``unsigned long long`` in *C*. @@ -1042,10 +1046,10 @@ type # these work for most platforms: ## high value is large enough to disable bounds checking in practice. ## Use `cstringArrayToSeq` to convert it into a ``seq[string]``. - PFloat32* = ptr Float32 ## an alias for ``ptr float32`` - PFloat64* = ptr Float64 ## an alias for ``ptr float64`` - PInt64* = ptr Int64 ## an alias for ``ptr int64`` - PInt32* = ptr Int32 ## an alias for ``ptr int32`` + PFloat32* = ptr float32 ## an alias for ``ptr float32`` + PFloat64* = ptr float64 ## an alias for ``ptr float64`` + PInt64* = ptr int64 ## an alias for ``ptr int64`` + PInt32* = ptr int32 ## an alias for ``ptr int32`` proc toFloat*(i: int): float {. magic: "ToFloat", noSideEffect, importc: "toFloat".} @@ -2615,12 +2619,13 @@ type PNimrodNode* {.magic: "PNimrodNode".} = ref TNimrodNode ## represents a Nimrod AST node. Macros operate on this type. -template eval*(blk: stmt): stmt = - ## executes a block of code at compile time just as if it was a macro - ## optionally, the block can return an AST tree that will replace the - ## eval expression - macro payload: stmt {.gensym.} = blk - payload() +when false: + template eval*(blk: stmt): stmt = + ## executes a block of code at compile time just as if it was a macro + ## optionally, the block can return an AST tree that will replace the + ## eval expression + macro payload: stmt {.gensym.} = blk + payload() when hostOS != "standalone": proc insert*(x: var string, item: string, i = 0) {.noSideEffect.} = |