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."
|
||||
description = "Godot Engine bindings"
|
||||
license = "MIT"
|
||||
|
|
|
|||
|
|
@ -43,13 +43,13 @@ proc max*(x, y: float32): float32 {.inline, noinit.} =
|
|||
|
||||
template printWarning*(warning: typed) =
|
||||
## Prints ``warning`` to Godot log, adding filename and line information.
|
||||
let (filename, line) = instantiationInfo()
|
||||
godotPrintWarning(cstring($warning), cstring"", cstring(filename), line.cint)
|
||||
let instInfo = instantiationInfo()
|
||||
godotPrintWarning(cstring($warning), cstring"", cstring(instInfo.filename), instInfo.line.cint)
|
||||
|
||||
template printError*(error: typed) =
|
||||
## Prints ``error`` to Godot log, adding filename and line information.
|
||||
let (filename, line) = instantiationInfo()
|
||||
godotPrintError(cstring($error), cstring"", cstring(filename), line.cint)
|
||||
let instInfo = instantiationInfo()
|
||||
godotPrintError(cstring($error), cstring"", cstring(instInfo.filename), instInfo.line.cint)
|
||||
|
||||
proc print*(parts: varargs[string, `$`]) =
|
||||
## Prints concatenated ``parts`` to Godot log.
|
||||
|
|
|
|||
|
|
@ -91,14 +91,14 @@ template genPoolArrayAPI(ArrayT, initIdent, DataT,
|
|||
|
||||
initIdent(result)
|
||||
if actualIdxFrom < 0 or actualIdxFrom >= ownLen:
|
||||
let (file, line) = instantiationInfo()
|
||||
let instInfo = instantiationInfo()
|
||||
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
|
||||
if actualIdxTo < 0 or actualIdxTo >= ownLen:
|
||||
let (file, line) = instantiationInfo()
|
||||
let instInfo = instantiationInfo()
|
||||
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
|
||||
let span = actualIdxTo - actualIdxFrom + 1
|
||||
result.setLen(span)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue