attempt to make 0.19 compatible

This commit is contained in:
Fabian Keller 2018-12-30 12:40:10 +01:00
commit 5ab4775939
5 changed files with 86 additions and 91 deletions

View file

@ -38,10 +38,7 @@ proc `$`*(self: GodotString): string =
proc toGodotString*(s: string): GodotString {.inline.} =
## Converts the Nim string into ``GodotString``
if s.isNil:
initGodotString(result)
else:
initGodotString(result, cstring(s), cint(s.len + 1))
initGodotString(result, cstring(s), cint(s.len + 1))
proc toGodotString*(s: cstring): GodotString {.inline.} =
## Converts the cstring into ``GodotString``