From af02e12685e18cb2fa70c0c8f39ac10d43f02409 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 12 Aug 2025 16:52:56 +0200 Subject: [PATCH] :tada: Add missing write-u32 helper to mem ns --- common/src/app/common/buffer.cljc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/src/app/common/buffer.cljc b/common/src/app/common/buffer.cljc index e72ea35abb..8e563cd4fe 100644 --- a/common/src/app/common/buffer.cljc +++ b/common/src/app/common/buffer.cljc @@ -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]