Skip to content

Pointers are segments: size C pointers before a read, SQLITE_TRANSIEN… - #2

Merged
borkdude merged 1 commit into
mainfrom
pointers-are-segments
Aug 26, 2026
Merged

Pointers are segments: size C pointers before a read, SQLITE_TRANSIEN…#2
borkdude merged 1 commit into
mainfrom
pointers-are-segments

Conversation

@borkdude

Copy link
Copy Markdown
Contributor

…T as a segment

babashka.ffi now hands out a MemorySegment with a size instead of a long. A pointer from C has size 0 and needs reinterpret before a read: blobs, argv in a callback and the aggregate slot. Blobs copy with read-bytes and write-bytes instead of a byte loop. SQLITE_TRANSIENT is the pseudo pointer (void*)-1, written as a segment now that a number is not a pointer.

…T as a segment

babashka.ffi now hands out a MemorySegment with a size instead of a
long. A pointer from C has size 0 and needs reinterpret before a read:
blobs, argv in a callback and the aggregate slot. Blobs copy with
read-bytes and write-bytes instead of a byte loop. SQLITE_TRANSIENT is
the pseudo pointer (void*)-1, written as a segment now that a number is
not a pointer.
@borkdude
borkdude merged commit e8d44bc into main Aug 26, 2026
7 of 9 checks passed
@borkdude
borkdude deleted the pointers-are-segments branch August 26, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant