make it compile with older nim versions
This commit is contained in:
parent
6efa7ecf18
commit
430814fdb3
2 changed files with 5 additions and 0 deletions
|
|
@ -12,6 +12,8 @@
|
||||||
# All symbols are prefixed with 'c_' to avoid ambiguities
|
# All symbols are prefixed with 'c_' to avoid ambiguities
|
||||||
|
|
||||||
{.push hints:off, stack_trace: off, profiler: off.}
|
{.push hints:off, stack_trace: off, profiler: off.}
|
||||||
|
when not defined(nimHasHotCodeReloading):
|
||||||
|
{.pragma: nonReloadable.}
|
||||||
|
|
||||||
proc c_memchr*(s: pointer, c: cint, n: csize): pointer {.
|
proc c_memchr*(s: pointer, c: cint, n: csize): pointer {.
|
||||||
importc: "memchr", header: "<string.h>".}
|
importc: "memchr", header: "<string.h>".}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
const useLibC = not defined(nimNoLibc)
|
const useLibC = not defined(nimNoLibc)
|
||||||
|
|
||||||
|
when not defined(nimHasHotCodeReloading):
|
||||||
|
{.pragma: nonReloadable.}
|
||||||
|
|
||||||
when useLibC:
|
when useLibC:
|
||||||
import ansi_c
|
import ansi_c
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue