From 1b47dac4e96b75e2676e5302be34741c08caed16 Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Mon, 16 Oct 2017 20:10:00 +0700 Subject: [PATCH] Fix thread_enter not to use GC --- godot.nimble | 2 +- godot/nim/godotnim.nim | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/godot.nimble b/godot.nimble index 4ec61f3..65e1ff1 100644 --- a/godot.nimble +++ b/godot.nimble @@ -1,4 +1,4 @@ -version = "0.6.1" +version = "0.6.2" author = "Xored Software, Inc." description = "Godot Engine bindings" license = "MIT" diff --git a/godot/nim/godotnim.nim b/godot/nim/godotnim.nim index b5c7d78..078e6ab 100644 --- a/godot/nim/godotnim.nim +++ b/godot/nim/godotnim.nim @@ -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"):