Merge pull request #4199 from oderwat/oderwat-fix-pragmas
Fixing pragmas (so syntax highligthing works).
This commit is contained in:
commit
6dd0887009
1 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ when defined(emscripten):
|
||||||
|
|
||||||
proc osTryAllocPages(size: int): pointer = osAllocPages(size)
|
proc osTryAllocPages(size: int): pointer = osAllocPages(size)
|
||||||
|
|
||||||
proc osDeallocPages(p: pointer, size: int) {.inline} =
|
proc osDeallocPages(p: pointer, size: int) {.inline.} =
|
||||||
var mmapDescrPos = cast[ByteAddress](p) -% sizeof(EmscriptenMMapBlock)
|
var mmapDescrPos = cast[ByteAddress](p) -% sizeof(EmscriptenMMapBlock)
|
||||||
var mmapDescr = cast[EmscriptenMMapBlock](mmapDescrPos)
|
var mmapDescr = cast[EmscriptenMMapBlock](mmapDescrPos)
|
||||||
munmap(mmapDescr.realPointer, mmapDescr.realSize)
|
munmap(mmapDescr.realPointer, mmapDescr.realSize)
|
||||||
|
|
@ -107,7 +107,7 @@ elif defined(posix):
|
||||||
MAP_PRIVATE or MAP_ANONYMOUS, -1, 0)
|
MAP_PRIVATE or MAP_ANONYMOUS, -1, 0)
|
||||||
if result == cast[pointer](-1): result = nil
|
if result == cast[pointer](-1): result = nil
|
||||||
|
|
||||||
proc osDeallocPages(p: pointer, size: int) {.inline} =
|
proc osDeallocPages(p: pointer, size: int) {.inline.} =
|
||||||
when reallyOsDealloc: discard munmap(p, size)
|
when reallyOsDealloc: discard munmap(p, size)
|
||||||
|
|
||||||
elif defined(windows):
|
elif defined(windows):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue