std: add compact_retaining, history_retain_length

This commit is contained in:
Nigel Tao committed 2023-10-05 13:24:44 +11:00
1 parent 0f91f23bb6
commit 5fb82e7d0a
33 files changed
+1088 -226

No files matched your search

+2 -2
View File
@@ -115,14 +115,14 @@ DecodeCbor(DecodeCborCallbacks& callbacks,
"wuffs_aux::DecodeCbor: internal error: io_buf is closed";
goto done;
}
io_buf->compact();
io_buf->compact_retaining(dec->history_retain_length());
if (io_buf->meta.wi >= io_buf->data.len) {
ret_error_message =
"wuffs_aux::DecodeCbor: internal error: io_buf is full";
goto done;
}
cursor_index = io_buf->meta.ri;
io_error_message = input.CopyIn(io_buf);
io_error_message = input.CopyIn(io_buf, dec->history_retain_length());
} else {
ret_error_message = tok_status.message();
goto done;