mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🎉 Add missing write-u32 helper to mem ns
This commit is contained in:
@@ -110,6 +110,13 @@
|
||||
(let [target (with-meta target {:tag 'java.nio.ByteBuffer})]
|
||||
`(.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
|
||||
"Idiomatic alias for `write-int`"
|
||||
[target offset value]
|
||||
|
||||
Reference in New Issue
Block a user