1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-10 06:46:08 +00:00

Update ffi/write to append to a buffer by default.

This commit is contained in:
Calvin Rose
2025-03-28 09:59:02 -05:00
parent 707463a645
commit b458404b41
3 changed files with 11 additions and 1 deletions

View File

@@ -55,4 +55,11 @@
(compwhen has-ffi
(assert-error "bad struct issue #1512" (ffi/struct :void)))
(compwhen has-ffi
(def buf @"")
(ffi/write :u8 10 buf)
(assert (= 1 (length buf)))
(ffi/write :u8 10 buf)
(assert (= 2 (length buf))))
(end-suite)