Mercurial > hg > th-libs
comparison th_ioctx.h @ 694:0fc5ddaccc57
Implement fclose() in mem ioctx, with an context flag for freeing the memory
on fclose().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 09 Mar 2020 18:55:54 +0200 |
parents | a622d21833e1 |
children | a04b8fe158b9 |
comparison
equal
deleted
inserted
replaced
693:a622d21833e1 | 694:0fc5ddaccc57 |
---|---|
47 size_t memSize; ///< Size of data | 47 size_t memSize; ///< Size of data |
48 size_t memAlloc; ///< Amount allocated | 48 size_t memAlloc; ///< Amount allocated |
49 size_t minAlloc; ///< Minimum allocation increase (0 = default) | 49 size_t minAlloc; ///< Minimum allocation increase (0 = default) |
50 off_t memOffset; ///< Current offset in data | 50 off_t memOffset; ///< Current offset in data |
51 uint8_t *memData; ///< Pointer to data | 51 uint8_t *memData; ///< Pointer to data |
52 BOOL memFree; ///< TRUE = free the allocated memory on thfclose(), FALSE = no | |
52 BOOL memWrite; ///< TRUE = memory can be written to / expanded etc. FALSE = no | 53 BOOL memWrite; ///< TRUE = memory can be written to / expanded etc. FALSE = no |
53 | 54 |
54 // Message functions | 55 // Message functions |
55 void (*error)(struct th_ioctx *ctx, const int err, const char *msg); | 56 void (*error)(struct th_ioctx *ctx, const int err, const char *msg); |
56 void (*msg)(struct th_ioctx *ctx, const int level, const char *msg); | 57 void (*msg)(struct th_ioctx *ctx, const int level, const char *msg); |