diff --git a/godot.nimble b/godot.nimble index eecbb2f..371275f 100644 --- a/godot.nimble +++ b/godot.nimble @@ -1,4 +1,4 @@ -version = "0.2.3" +version = "0.2.4" author = "Xored Software, Inc." description = "Godot Engine bindings" license = "MIT" diff --git a/godot/nim/godotmacros.nim b/godot/nim/godotmacros.nim index 4ab140c..3e32176 100644 --- a/godot/nim/godotmacros.nim +++ b/godot/nim/godotmacros.nim @@ -473,7 +473,8 @@ proc genType(obj: ObjectDecl): NimNode {.compileTime.} = else: toGodotStyle(meth.name) let hasReturnValueBool = not (meth.returnType.isNil or meth.returnType.kind == nnkEmpty or - $meth.returnType == "void") + (meth.returnType.kind == nnkIdent and + meth.returnType.ident == !"void")) let hasReturnValue = if hasReturnValueBool: ident("true") else: ident("false") result.add(getAst( diff --git a/godot/nim/godotnim.nim b/godot/nim/godotnim.nim index a36ee91..e998ee8 100644 --- a/godot/nim/godotnim.nim +++ b/godot/nim/godotnim.nim @@ -493,7 +493,7 @@ proc godotVariantType*(T: typedesc[Table|TableRef]): VariantType {.inline.} = VariantType.Dictionary proc toGodot*[T: Table or TableRef](t: T): Variant = - let dict = initDictionary() + var dict = initDictionary() mixin toGodot for k, v in t.pairs(): dict[toGodot(k)] = toGodot(v)