mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 10:56:20 +00:00
🎉 Add missing write-u32 helper to mem ns
This commit is contained in:
parent
675864ce0b
commit
af02e12685
@ -110,6 +110,13 @@
|
|||||||
(let [target (with-meta target {:tag 'java.nio.ByteBuffer})]
|
(let [target (with-meta target {:tag 'java.nio.ByteBuffer})]
|
||||||
`(.putInt ~target ~offset (unchecked-int ~value)))))
|
`(.putInt ~target ~offset (unchecked-int ~value)))))
|
||||||
|
|
||||||
|
(defmacro write-u32
|
||||||
|
[target offset value]
|
||||||
|
(if (:ns &env)
|
||||||
|
`(.setUint32 ~target ~offset ~value true)
|
||||||
|
(let [target (with-meta target {:tag 'java.nio.ByteBuffer})]
|
||||||
|
`(.putInt ~target ~offset (unchecked-int ~value)))))
|
||||||
|
|
||||||
(defmacro write-i32
|
(defmacro write-i32
|
||||||
"Idiomatic alias for `write-int`"
|
"Idiomatic alias for `write-int`"
|
||||||
[target offset value]
|
[target offset value]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user