Deprecate PHP (#13838)

This commit is contained in:
Juan Carlos 2020-04-02 03:48:09 -03:00 • committed by GitHub
commit c167261735
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,22 +8,7 @@
# "Stack GC" for embedded devices or ultra performance requirements. # "Stack GC" for embedded devices or ultra performance requirements.
when defined(nimphpext): when defined(useMalloc):
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):
proc roundup(x, v: int): int {.inline.} = proc roundup(x, v: int): int {.inline.} =
result = (x + (v-1)) and not (v-1) result = (x + (v-1)) and not (v-1)
proc emalloc(size: int): pointer {.importc: "malloc", header: "<stdlib.h>".} proc emalloc(size: int): pointer {.importc: "malloc", header: "<stdlib.h>".}