Add a mark method and type.

This commit is contained in:
Nigel Tao committed 2017-09-23 13:17:37 +10:00
1 parent 6a48794033
commit fd5d44b3fc
13 files changed
+141 -77

No files matched your search

+6
View File
@@ -54,6 +54,12 @@ typedef struct {
bool closed; // No further writes are expected.
} puffs_base_buf1;
// puffs_base_buf1_mark marks a position (pointer + offset) in a
// puffs_base_buf1.
typedef struct {
uint8_t* ptr;
} puffs_base_buf1_mark;
// puffs_base_limit1 provides a limited view of a 1-dimensional byte stream:
// its first N bytes. That N can be greater than a buffer's current read or
// write capacity. N decreases naturally over time as bytes are read from or