mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-16 16:47:24 +00:00
fix: initialize nim gc
This commit is contained in:
parent
4a3e9b5374
commit
ba884f63c2
@ -86,6 +86,15 @@ proc ensureDirectories*(dataDir, tmpDir, logDir: string) =
|
||||
createDir(logDir)
|
||||
|
||||
proc logHandlerCallback(messageType: cint, message: cstring, category: cstring, file: cstring, function: cstring, line: cint) {.cdecl, exportc.} =
|
||||
# Initialize Nim GC stack bottom for foreign threads
|
||||
# https://status-im.github.io/nim-style-guide/interop.html#calling-nim-code-from-other-languages
|
||||
when declared(setupForeignThreadGc):
|
||||
setupForeignThreadGc()
|
||||
when declared(nimGC_setStackBottom):
|
||||
var locals {.volatile, noinit.}: pointer
|
||||
locals = addr(locals)
|
||||
nimGC_setStackBottom(locals)
|
||||
|
||||
var text = $message
|
||||
let fileString = $file
|
||||
|
||||
|
2
vendor/nimqml
vendored
2
vendor/nimqml
vendored
@ -1 +1 @@
|
||||
Subproject commit 8fd783743b00ca3ec6616a20c7cac14be792822c
|
||||
Subproject commit 10f8dc4ca2d67acbf6bc7e0f49f4c0c8ff2737a0
|
Loading…
x
Reference in New Issue
Block a user