[Nim] handle special characters in paths (#412)

This commit is contained in:
tersec 2024-03-26 19:25:07 +00:00 committed by GitHub
parent 6164f277d9
commit 1ef67c17bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,8 +22,8 @@ when not defined(kzgExternalBlst):
{.compile: srcPath & "c_kzg_4844.c"} {.compile: srcPath & "c_kzg_4844.c"}
{.passc: "-I" & bindingsPath .} {.passc: "-I" & escape(bindingsPath) .}
{.passc: "-I" & srcPath .} {.passc: "-I" & escape(srcPath) .}
const const
FIELD_ELEMENTS_PER_BLOB* = 4096 FIELD_ELEMENTS_PER_BLOB* = 4096
@ -40,7 +40,7 @@ const
KZG_ERROR* = (2).KZG_RET KZG_ERROR* = (2).KZG_RET
KZG_MALLOC* = (3).KZG_RET KZG_MALLOC* = (3).KZG_RET
proc `$`*(x: KZG_RET): string = func `$`*(x: KZG_RET): string =
case x case x
of KZG_OK: "ok" of KZG_OK: "ok"
of KZG_BADARGS: "kzg badargs" of KZG_BADARGS: "kzg badargs"
@ -48,7 +48,7 @@ proc `$`*(x: KZG_RET): string =
of KZG_MALLOC: "kzg malloc error" of KZG_MALLOC: "kzg malloc error"
else: "kzg unknown error" else: "kzg unknown error"
proc `==`*(a, b: KZG_RET): bool = func `==`*(a, b: KZG_RET): bool =
a.cint == b.cint a.cint == b.cint
type type