Use setStackBottom for methods called from outside
This commit is contained in:
parent
3e1e8f1073
commit
0d21c361d0
2 changed files with 8 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
version = "0.6.8"
|
||||
version = "0.6.9"
|
||||
author = "Xored Software, Inc."
|
||||
description = "Godot Engine bindings"
|
||||
license = "MIT"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue