attempt to make 0.19 compatible
This commit is contained in:
parent
e9d73d8ec4
commit
5ab4775939
5 changed files with 86 additions and 91 deletions
|
|
@ -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``
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue