diff options
| author | peter <peter@pmikkelsen.com> | 2026-08-10 09:18:23 +0000 |
|---|---|---|
| committer | peter <peter@pmikkelsen.com> | 2026-08-10 09:18:23 +0000 |
| commit | 3a81615601bf37ffc4f7b570030709ac0782e2ed (patch) | |
| tree | fc5a4d59b9bb62521d37a878c1fa7bb34d3d2bb5 /src/aplwc.h | |
| parent | e30299f2cd59c46c2d733e38139da96c93f9acf4 (diff) | |
Avoid calling malloc/free in the library code.
FossilOrigin-Name: 3e7c2c1b4beda2a729c880caf1a41c441e0a8387d40b666ac7163eb1346653b5
Diffstat (limited to 'src/aplwc.h')
| -rw-r--r-- | src/aplwc.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/aplwc.h b/src/aplwc.h index 7a90147..e01e38c 100644 --- a/src/aplwc.h +++ b/src/aplwc.h @@ -1,15 +1,18 @@ #ifndef APLWC_H #define APLWC_H +#include <stdint.h> +#include <stddef.h> + typedef enum { APLWC_OK, APLWC_NOT_IMPLEMENTED, - APLWC_MALLOC_FAILED, + APLWC_OUT_OF_MEMORY, } AplwcRc; typedef struct Aplwc Aplwc; -AplwcRc aplwc_new(Aplwc **); +AplwcRc aplwc_new(Aplwc **, uint8_t *, size_t); AplwcRc aplwc_destroy(Aplwc *); const char *aplwc_errstr(Aplwc *); |