mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-22 08:51:21 +00:00
Deprecate PHP (#13838)
This commit is contained in:
@@ -8,22 +8,7 @@
|
||||
|
||||
# "Stack GC" for embedded devices or ultra performance requirements.
|
||||
|
||||
when defined(nimphpext):
|
||||
proc roundup(x, v: int): int {.inline.} =
|
||||
result = (x + (v-1)) and not (v-1)
|
||||
proc emalloc(size: int): pointer {.importc: "_emalloc".}
|
||||
proc efree(mem: pointer) {.importc: "_efree".}
|
||||
|
||||
proc osAllocPages(size: int): pointer {.inline.} =
|
||||
emalloc(size)
|
||||
|
||||
proc osTryAllocPages(size: int): pointer {.inline.} =
|
||||
emalloc(size)
|
||||
|
||||
proc osDeallocPages(p: pointer, size: int) {.inline.} =
|
||||
efree(p)
|
||||
|
||||
elif defined(useMalloc):
|
||||
when defined(useMalloc):
|
||||
proc roundup(x, v: int): int {.inline.} =
|
||||
result = (x + (v-1)) and not (v-1)
|
||||
proc emalloc(size: int): pointer {.importc: "malloc", header: "<stdlib.h>".}
|
||||
|
||||
Reference in New Issue
Block a user