Use reinterpret, not slice-global
This commit is contained in:
parent
ab0af5b0ca
commit
9af8cb0b47
1 changed files with 1 additions and 1 deletions
|
|
@ -651,7 +651,7 @@ floats, the following code might be used.
|
||||||
(let [out-floats (mem/alloc mem/pointer-size arena)
|
(let [out-floats (mem/alloc mem/pointer-size arena)
|
||||||
num-floats (returns-float-array* out-floats)
|
num-floats (returns-float-array* out-floats)
|
||||||
floats-addr (mem/read-address out-floats)
|
floats-addr (mem/read-address out-floats)
|
||||||
floats-slice (mem/slice-global floats-addr (unchecked-multiply-int mem/float-size num-floats))]
|
floats-slice (mem/reinterpret floats-addr (unchecked-multiply-int mem/float-size num-floats))]
|
||||||
;; Using a try/finally to perform an operation when the stack frame exits,
|
;; Using a try/finally to perform an operation when the stack frame exits,
|
||||||
;; but not to try to catch anything.
|
;; but not to try to catch anything.
|
||||||
(try
|
(try
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue