aboutsummaryrefslogtreecommitdiffstats
path: root/core/module-save.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 04:42:05 +0100
committereunhhu <[email protected]>2026-10-19 04:42:05 +0100
commit6596533b0d5fe10f3cab028d7fa69a40e5416ecd (patch)
tree9c5a64858ac749d892e673b7aab04928cd3bbe60 /core/module-save.h
parent5a2292a389989b71b99ea582cf306cf1719d8aae (diff)
downloadpure-6596533b0d5fe10f3cab028d7fa69a40e5416ecd.tar.gz
pure-6596533b0d5fe10f3cab028d7fa69a40e5416ecd.zip
028's bytes alone as a state, made: module state type 6 read as a text state flagged PURE_TEXT_BYTES in state_flags (so serve's same_states compares it for queries and replaces), its TEXT_LOAD giving bytes and its TEXT_SET taking them, a cursor's ops on it refused (anchor in bytes) and an anchor in it refused at load; one store file text-NAME, the values record marking each bytes state (kind 7, its name, 8 zero bytes), a text state's file that is no UTF-8 its initial value when marked and store_error when not (as before); a replace carrying bytes to a text only when its draft is UTF-8, else opening the store's draft anew; pure-run shows a bytes state's hex; unit test bytes_states (seven starts from a store: 0xff and 0x00 kept, bytes to text to bytes to text with no UTF-8 and with it; three replaces; four refused); counts: b47 against b46 BFS with batches +0.12%, the rest within 0.001%; the bank's queries (s45 and s47 in turns, six each, bytes compared among them) in_credit -0.31%, per_branch -0.18%, ranks -0.11%, the rest within 0.01%, the seven answers the same bytes; Pure, Vega and aup checks green; 008, 028
Diffstat (limited to 'core/module-save.h')
-rw-r--r--core/module-save.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/module-save.h b/core/module-save.h
index 44d3b95..2a82d10 100644
--- a/core/module-save.h
+++ b/core/module-save.h
@@ -10,7 +10,10 @@
bool pure_save_enabled(const PureApp *);
/* A text state of m: its stored value, or its initial constant when none. */
-PureResult pure_save_open_text(PureApp *, const PureModule *m, uint32_t state, PureDraft **out, PureVersion *saved);
+/* A text state's draft in the store, its initial value where it has none, where anew says (a move that keeps nothing,
+ * 028), or where its bytes are no UTF-8 but the values record marks it bytes; store_error where they are no UTF-8
+ * otherwise. A bytes state's asks no UTF-8. */
+PureResult pure_save_open_text(PureApp *, const PureModule *m, uint32_t state, bool anew, PureDraft **out, PureVersion *saved);
/* Stored lists (module-save.c): at a start, the log opened and read for the
* lists (pure_save_open_log), each list opened from its image with its
* logged changes made again (pure_save_open_list; saved says what its image