Fix for latest Nim
This commit is contained in:
parent
a1d1481967
commit
96dfc7de90
3 changed files with 9 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
version = "0.7.10"
|
version = "0.7.11"
|
||||||
author = "Xored Software, Inc."
|
author = "Xored Software, Inc."
|
||||||
description = "Godot Engine bindings"
|
description = "Godot Engine bindings"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
||||||
|
|
@ -43,13 +43,13 @@ proc max*(x, y: float32): float32 {.inline, noinit.} =
|
||||||
|
|
||||||
template printWarning*(warning: typed) =
|
template printWarning*(warning: typed) =
|
||||||
## Prints ``warning`` to Godot log, adding filename and line information.
|
## Prints ``warning`` to Godot log, adding filename and line information.
|
||||||
let (filename, line) = instantiationInfo()
|
let instInfo = instantiationInfo()
|
||||||
godotPrintWarning(cstring($warning), cstring"", cstring(filename), line.cint)
|
godotPrintWarning(cstring($warning), cstring"", cstring(instInfo.filename), instInfo.line.cint)
|
||||||
|
|
||||||
template printError*(error: typed) =
|
template printError*(error: typed) =
|
||||||
## Prints ``error`` to Godot log, adding filename and line information.
|
## Prints ``error`` to Godot log, adding filename and line information.
|
||||||
let (filename, line) = instantiationInfo()
|
let instInfo = instantiationInfo()
|
||||||
godotPrintError(cstring($error), cstring"", cstring(filename), line.cint)
|
godotPrintError(cstring($error), cstring"", cstring(instInfo.filename), instInfo.line.cint)
|
||||||
|
|
||||||
proc print*(parts: varargs[string, `$`]) =
|
proc print*(parts: varargs[string, `$`]) =
|
||||||
## Prints concatenated ``parts`` to Godot log.
|
## Prints concatenated ``parts`` to Godot log.
|
||||||
|
|
|
||||||
|
|
@ -91,14 +91,14 @@ template genPoolArrayAPI(ArrayT, initIdent, DataT,
|
||||||
|
|
||||||
initIdent(result)
|
initIdent(result)
|
||||||
if actualIdxFrom < 0 or actualIdxFrom >= ownLen:
|
if actualIdxFrom < 0 or actualIdxFrom >= ownLen:
|
||||||
let (file, line) = instantiationInfo()
|
let instInfo = instantiationInfo()
|
||||||
getGDNativeAPI().printError(
|
getGDNativeAPI().printError(
|
||||||
cstring"Invalid subarray begin index", cstring"subarray", file, line.cint)
|
cstring"Invalid subarray begin index", cstring"subarray", instInfo.filename, instInfo.line.cint)
|
||||||
return
|
return
|
||||||
if actualIdxTo < 0 or actualIdxTo >= ownLen:
|
if actualIdxTo < 0 or actualIdxTo >= ownLen:
|
||||||
let (file, line) = instantiationInfo()
|
let instInfo = instantiationInfo()
|
||||||
getGDNativeAPI().printError(
|
getGDNativeAPI().printError(
|
||||||
cstring"Invalid subarray end index", cstring"subarray", file, line.cint)
|
cstring"Invalid subarray end index", cstring"subarray", instInfo.filename, instInfo.line.cint)
|
||||||
return
|
return
|
||||||
let span = actualIdxTo - actualIdxFrom + 1
|
let span = actualIdxTo - actualIdxFrom + 1
|
||||||
result.setLen(span)
|
result.setLen(span)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue