no *mem proc's for JS
This commit is contained in:
parent
5e93924afd
commit
03ce08c47b
1 changed files with 2 additions and 1 deletions
|
|
@ -1594,7 +1594,7 @@ proc substr*(s: string, first, last: int): string {.
|
||||||
## is used instead: This means ``substr`` can also be used to `cut`:idx:
|
## is used instead: This means ``substr`` can also be used to `cut`:idx:
|
||||||
## or `limit`:idx: a string's length.
|
## or `limit`:idx: a string's length.
|
||||||
|
|
||||||
when not defined(nimscript):
|
when not defined(nimscript) and not defined(JS):
|
||||||
proc zeroMem*(p: pointer, size: Natural) {.inline, benign.}
|
proc zeroMem*(p: pointer, size: Natural) {.inline, benign.}
|
||||||
## overwrites the contents of the memory at ``p`` with the value 0.
|
## overwrites the contents of the memory at ``p`` with the value 0.
|
||||||
## Exactly ``size`` bytes will be overwritten. Like any procedure
|
## Exactly ``size`` bytes will be overwritten. Like any procedure
|
||||||
|
|
@ -1619,6 +1619,7 @@ when not defined(nimscript):
|
||||||
## otherwise. Like any procedure dealing with raw memory this is
|
## otherwise. Like any procedure dealing with raw memory this is
|
||||||
## *unsafe*.
|
## *unsafe*.
|
||||||
|
|
||||||
|
when not defined(nimscript):
|
||||||
when hasAlloc:
|
when hasAlloc:
|
||||||
proc alloc*(size: Natural): pointer {.noconv, rtl, tags: [], benign.}
|
proc alloc*(size: Natural): pointer {.noconv, rtl, tags: [], benign.}
|
||||||
## allocates a new memory block with at least ``size`` bytes. The
|
## allocates a new memory block with at least ``size`` bytes. The
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue