mirror of
https://github.com/penpot/penpot.git
synced 2026-04-28 04:38:14 +00:00
🎉 Add write-bool helper to buffer ns helpers
This commit is contained in:
parent
4e2998a366
commit
22a70eb5b2
@ -74,6 +74,13 @@
|
||||
(let [target (with-meta target {:tag 'java.nio.ByteBuffer})]
|
||||
`(.put ~target ~offset (unchecked-byte ~value)))))
|
||||
|
||||
(defmacro write-bool
|
||||
[target offset value]
|
||||
(if (:ns &env)
|
||||
`(.setInt8 ~target ~offset (if ~value 0x01 0x00) true)
|
||||
(let [target (with-meta target {:tag 'java.nio.ByteBuffer})]
|
||||
`(.put ~target ~offset (unchecked-byte (if ~value 0x01 0x00))))))
|
||||
|
||||
(defmacro write-short
|
||||
[target offset value]
|
||||
(if (:ns &env)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user