make it compile with older nim versions

This commit is contained in:
Araq
2019-04-08 17:17:54 +02:00
parent 6efa7ecf18
commit 430814fdb3
2 changed files with 5 additions and 0 deletions

View File

@@ -12,6 +12,8 @@
# All symbols are prefixed with 'c_' to avoid ambiguities
{.push hints:off, stack_trace: off, profiler: off.}
when not defined(nimHasHotCodeReloading):
{.pragma: nonReloadable.}
proc c_memchr*(s: pointer, c: cint, n: csize): pointer {.
importc: "memchr", header: "<string.h>".}

View File

@@ -1,5 +1,8 @@
const useLibC = not defined(nimNoLibc)
when not defined(nimHasHotCodeReloading):
{.pragma: nonReloadable.}
when useLibC:
import ansi_c