From d3e5f91b403cb1cabc3d2f298b2c6ffc994493e4 Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Fri, 14 Aug 2020 01:44:48 +0700 Subject: [PATCH] Fix wrapping methods with Array return types --- godot.nimble | 2 +- godot/godotapigen.nim | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/godot.nimble b/godot.nimble index 817406d..a296063 100644 --- a/godot.nimble +++ b/godot.nimble @@ -1,4 +1,4 @@ -version = "0.8.0" +version = "0.8.1" author = "Xored Software, Inc." description = "Godot Engine bindings" license = "MIT" diff --git a/godot/godotapigen.nim b/godot/godotapigen.nim index 432814e..ccbcc6c 100644 --- a/godot/godotapigen.nim +++ b/godot/godotapigen.nim @@ -642,6 +642,8 @@ proc doGenerateMethod(tree: PNode, methodBindRegistry: var HashSet[string], body.add(newPNode(nkVarSection).addChain(newIdentDefs( retValIdent, ident("Godot" & returnType), ))) + if returnType != "NodePath": + body.add(newCall("initGodot" & returnType, retValIdent)) elif returnType in standardTypes: addrToAssign = newCall("addr", ident("result")) elif returnType == "string":