mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 08:47:56 +01:00
First cut at a "[] u8" slice type.
This commit is contained in:
1 parent
ceedd8c3b9
commit
519ec373f2
15 files changed
+123
-32
No files matched your search
+11
-2
@@ -37,8 +37,16 @@
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define PUFFS_VERSION (0x00001)
|
||||
|
||||
// puffs_base_buf1 is a 1-dimensional buffer (a pointer and length) plus
|
||||
// additional indexes into that buffer.
|
||||
// puffs_base_slice_u8 is a 1-dimensional buffer (a pointer and length).
|
||||
//
|
||||
// A value with all fields NULL or zero is a valid, empty slice.
|
||||
typedef struct {
|
||||
uint8_t* ptr;
|
||||
size_t len;
|
||||
} puffs_base_slice_u8;
|
||||
|
||||
// puffs_base_buf1 is a 1-dimensional buffer (a pointer and length), plus
|
||||
// additional indexes into that buffer, plus an opened / closed flag.
|
||||
//
|
||||
// A value with all fields NULL or zero is a valid, empty buffer.
|
||||
typedef struct {
|
||||
@@ -162,6 +170,7 @@ typedef struct {
|
||||
struct {
|
||||
uint32_t coro_susp_point;
|
||||
puffs_flate_status v_z;
|
||||
puffs_base_slice_u8 v_written;
|
||||
} c_decode[1];
|
||||
struct {
|
||||
uint32_t coro_susp_point;
|
||||
|
||||
+10
-2
@@ -37,8 +37,16 @@
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define PUFFS_VERSION (0x00001)
|
||||
|
||||
// puffs_base_buf1 is a 1-dimensional buffer (a pointer and length) plus
|
||||
// additional indexes into that buffer.
|
||||
// puffs_base_slice_u8 is a 1-dimensional buffer (a pointer and length).
|
||||
//
|
||||
// A value with all fields NULL or zero is a valid, empty slice.
|
||||
typedef struct {
|
||||
uint8_t* ptr;
|
||||
size_t len;
|
||||
} puffs_base_slice_u8;
|
||||
|
||||
// puffs_base_buf1 is a 1-dimensional buffer (a pointer and length), plus
|
||||
// additional indexes into that buffer, plus an opened / closed flag.
|
||||
//
|
||||
// A value with all fields NULL or zero is a valid, empty buffer.
|
||||
typedef struct {
|
||||
|
||||
Reference in new issue
Block a user