blob: b8a8398e34b6f6e418e2bea257f7981eaa8a0734 (
plain) (
tree)
|
|
import bindings/quickjs
template toJSValueArray*(a: openArray[JSValue]): ptr UncheckedArray[JSValue] =
cast[ptr UncheckedArray[JSValue]](unsafeAddr a[0])
# Warning: this must be a template, because we're taking the address of
# the passed value, and Nim is pass-by-value.
template toJSValueArray*(a: JSValue): ptr UncheckedArray[JSValue] =
cast[ptr UncheckedArray[JSValue]](unsafeAddr a)
|