1.1 --- a/src/cx/common.h Mon May 16 19:25:19 2022 +0200 1.2 +++ b/src/cx/common.h Wed May 18 16:26:32 2022 +0200 1.3 @@ -94,6 +94,25 @@ 1.4 #include <stdbool.h> 1.5 1.6 /** 1.7 + * Structure that contains a pointer to arbitrary data. 1.8 + */ 1.9 +struct cx_data_ptr_s { 1.10 + /** 1.11 + * A pointer to the data. 1.12 + */ 1.13 + unsigned const char *data; 1.14 + /** 1.15 + * The length of the data. 1.16 + */ 1.17 + size_t len; 1.18 +}; 1.19 + 1.20 +/** 1.21 + * Type for a data pointer with length information. 1.22 + */ 1.23 +typedef struct cx_data_ptr_s CxDataPtr; 1.24 + 1.25 +/** 1.26 * Function pointer compatible with fwrite-like functions. 1.27 */ 1.28 typedef size_t (*cx_write_func)(