diff --git a/godot/godotapigen.nim b/godot/godotapigen.nim index f718c60..a8c9804 100644 --- a/godot/godotapigen.nim +++ b/godot/godotapigen.nim @@ -532,7 +532,7 @@ proc doGenerateMethod(tree: PNode, methodBindRegistry: var HashSet[string], body.add(newNode(nkVarSection).addChain(newIdentDefs( retValIdent, ident("GodotString"), ))) - else: + elif meth.returnType != "void": isObjRet = true body.add(newNode(nkVarSection).addChain(newIdentDefs( retValIdent, newNode(nkPtrTy).addChain(ident("GodotObject")),