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

+8
View File
@@ -57,6 +57,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
@@ -171,7 +177,9 @@ typedef struct {
struct {
uint32_t coro_susp_point;
puffs_base_buf1_mark v_m0;
puffs_flate_status v_z;
puffs_base_buf1_mark v_m1;
puffs_base_slice_u8 v_written;
} c_decode[1];
struct {
+6
View File
@@ -57,6 +57,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