sqlite bindings: cite sx issue 0128 for the ?[:0]u8 boundary

This commit is contained in:
agra
2026-06-12 13:23:13 +03:00
parent 9d8b334e32
commit cd896f92ec

View File

@@ -38,10 +38,11 @@
// `prepare_v2/v3` and `bind_text/blob` take `[*]u8` + explicit byte // `prepare_v2/v3` and `bind_text/blob` take `[*]u8` + explicit byte
// length instead, so un-terminated sx string views pass without // length instead, so un-terminated sx string views pass without
// copying. Nullable C strings OUT are `?*u8` — the null lives in the // copying. Nullable C strings OUT are `?*u8` — the null lives in the
// type (`?[:0]u8` would be ideal but does not resolve in sx yet, and a // type. `?[:0]u8` is the contract these should carry (a nullable thin
// sentinel-slice return would need a synthesized strlen) — and are // char*), but [:0]u8 returns/optionals don't cross the FFI correctly
// COPIED into `context.allocator` before returning — sqlite's buffers // yet — sx issue 0128. Returned strings are COPIED into
// die on the next step/finalize/close. // `context.allocator` before returning — sqlite's buffers die on the
// next step/finalize/close.
// ===================================================================== // =====================================================================
#import "modules/std.sx"; #import "modules/std.sx";