base: add optional_u63 type

This commit is contained in:
Nigel Tao committed 2023-11-19 12:02:24 +11:00
1 parent e517ca4bee
commit 82ea1985b4
32 files changed
+470 -295

No files matched your search

+2 -2
View File
@@ -1394,7 +1394,7 @@ main1(int argc, char** argv) {
}
// Check that we've exhausted the input.
if ((g_src.meta.ri == g_src.meta.wi) && !g_src.meta.closed) {
TRY(read_src(g_dec.history_retain_length()));
TRY(read_src(g_dec.history_retain_length().value_or(UINT64_MAX)));
}
if ((g_src.meta.ri < g_src.meta.wi) || !g_src.meta.closed) {
return "main: valid JSON followed by further (unexpected) data";
@@ -1405,7 +1405,7 @@ main1(int argc, char** argv) {
if (g_cursor_index != g_src.meta.ri) {
return "main: internal error: inconsistent g_src indexes";
}
TRY(read_src(g_dec.history_retain_length()));
TRY(read_src(g_dec.history_retain_length().value_or(UINT64_MAX)));
g_cursor_index = g_src.meta.ri;
} else if (status.repr == wuffs_base__suspension__short_write) {
g_tok.compact();