Fix thread_enter not to use GC

This commit is contained in:
Ruslan Mustakov 2017-10-16 20:10:00 +07:00
commit 1b47dac4e9
2 changed files with 5 additions and 2 deletions

View file

@ -828,7 +828,10 @@ proc godot_nativescript_thread_enter() {.cdecl, exportc, dynlib.} =
when compileOption("threads"):
setupForeignThreadGc()
else:
print(cstring"A foreign thread is created, but app is compiled without --threads:on. Bad things will happen if Nim code is invoked from this thread.")
const err = cstring"A foreign thread is created, but app is compiled without --threads:on. Bad things will happen if Nim code is invoked from this thread."
var s = err.toGodotString()
godotPrint(s)
s.deinit()
proc godot_nativescript_thread_exit() {.cdecl, exportc, dynlib.} =
when compileOption("threads"):