fixes #1964
This commit is contained in:
parent
5f6131cbdc
commit
f6bdda2c5e
1 changed files with 3 additions and 2 deletions
|
|
@ -292,11 +292,12 @@ const NoFakeVars* = defined(NimrodVM) ## true if the backend doesn't support \
|
||||||
## "fake variables" like 'var EBADF {.importc.}: cint'.
|
## "fake variables" like 'var EBADF {.importc.}: cint'.
|
||||||
|
|
||||||
when not defined(JS):
|
when not defined(JS):
|
||||||
|
const ArrayDummySize = when defined(cpu16): 10_000 else: 100_000_000
|
||||||
type
|
type
|
||||||
TGenericSeq {.compilerproc, pure, inheritable.} = object
|
TGenericSeq {.compilerproc, pure, inheritable.} = object
|
||||||
len, reserved: int
|
len, reserved: int
|
||||||
PGenericSeq {.exportc.} = ptr TGenericSeq
|
PGenericSeq {.exportc.} = ptr TGenericSeq
|
||||||
UncheckedCharArray {.unchecked.} = array[0..100_000_000, char]
|
UncheckedCharArray {.unchecked.} = array[0..ArrayDummySize, char]
|
||||||
# len and space without counting the terminating zero:
|
# len and space without counting the terminating zero:
|
||||||
NimStringDesc {.compilerproc, final.} = object of TGenericSeq
|
NimStringDesc {.compilerproc, final.} = object of TGenericSeq
|
||||||
data: UncheckedCharArray
|
data: UncheckedCharArray
|
||||||
|
|
@ -1227,7 +1228,7 @@ type # these work for most platforms:
|
||||||
culonglong* {.importc: "unsigned long long", nodecl.} = uint64
|
culonglong* {.importc: "unsigned long long", nodecl.} = uint64
|
||||||
## This is the same as the type ``unsigned long long`` in *C*.
|
## This is the same as the type ``unsigned long long`` in *C*.
|
||||||
|
|
||||||
cstringArray* {.importc: "char**", nodecl.} = ptr array [0..50_000, cstring]
|
cstringArray* {.importc: "char**", nodecl.} = ptr array [0..ArrayDummySize, cstring]
|
||||||
## This is binary compatible to the type ``char**`` in *C*. The array's
|
## This is binary compatible to the type ``char**`` in *C*. The array's
|
||||||
## high value is large enough to disable bounds checking in practice.
|
## high value is large enough to disable bounds checking in practice.
|
||||||
## Use `cstringArrayToSeq` to convert it into a ``seq[string]``.
|
## Use `cstringArrayToSeq` to convert it into a ``seq[string]``.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue