diff --git a/godot.nimble b/godot.nimble index cac30be..968dac3 100644 --- a/godot.nimble +++ b/godot.nimble @@ -1,4 +1,4 @@ -version = "0.6.8" +version = "0.6.9" author = "Xored Software, Inc." description = "Godot Engine bindings" license = "MIT" diff --git a/godot/nim/godotmacros.nim b/godot/nim/godotmacros.nim index ef478f9..682f8ec 100644 --- a/godot/nim/godotmacros.nim +++ b/godot/nim/godotmacros.nim @@ -541,10 +541,17 @@ proc genType(obj: ObjectDecl): NimNode {.compileTime.} = template registerGodotMethod(classNameLit, classNameIdent, methodNameIdent, methodNameLit, minArgs, maxArgs, argTypes, methFuncIdent, hasReturnValue) = + {.emit: """/*TYPESECTION*/ +N_NOINLINE(void, setStackBottom)(void* thestackbottom); +""".} proc methFuncIdent(obj: ptr GodotObject, methodData: pointer, userData: pointer, numArgs: cint, args: var array[MAX_ARG_COUNT, ptr GodotVariant]): GodotVariant {.noconv.} = + var stackBottom {.volatile.}: pointer + {.emit: """ + setStackBottom((void*)(&`stackBottom`)); + """.} let self = cast[classNameIdent](userData) const isStaticCall = methodNameLit == cstring"_ready" or methodNameLit == cstring"_process" or