Fix checking for void and table's toGodot
This commit is contained in:
parent
de89df71ad
commit
94f6f7c8a7
3 changed files with 4 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
version = "0.2.3"
|
||||
version = "0.2.4"
|
||||
author = "Xored Software, Inc."
|
||||
description = "Godot Engine bindings"
|
||||
license = "MIT"
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue