diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2020-02-15 12:45:08 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2020-02-15 12:45:08 +0000 |
commit | 1eb99bf05849e3108129d32eaacaa40c9e266c4b (patch) | |
tree | 23d14dd9414feedf2c78eb5029a5c7ed60c2bca2 /Build/source/texk/web2c/luatexdir/luapplib/src/ppheap.h | |
parent | c919a62f6a535e0c586534c9ac6d8f671d91c02c (diff) |
sync with luatex rev. 7287
git-svn-id: svn://tug.org/texlive/trunk@53789 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luapplib/src/ppheap.h')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luapplib/src/ppheap.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luapplib/src/ppheap.h b/Build/source/texk/web2c/luatexdir/luapplib/src/ppheap.h new file mode 100644 index 00000000000..1d6559d93c0 --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luapplib/src/ppheap.h @@ -0,0 +1,46 @@ + +#ifndef PP_HEAP_H +#define PP_HEAP_H + +#include "utilmem.h" + +#define pp_malloc util_malloc +//#define pp_callic util_calloc +//#define pp_realloc util_realloc +#define pp_free util_free + +#include "utilmemheapiof.h" +//#include "utilmeminfo.h" + +#define ppbytes_heap heap16 +#define ppbytes_heap_init(heap, space, large, flags) (heap16_init(&(heap)->bytesheap, space, large, flags), heap16_head(&(heap)->bytesheap)) +//#define ppbytes_heap_some(heap, size, pspace) _heap16_some(&(heap)->bytesheap, size, pspace) +#define ppbytes_heap_done(heap, data, written) heap16_done(&(heap)->bytesheap, data, written) +#define ppbytes_heap_clear(heap) heap16_clear(&(heap)->bytesheap) +#define ppbytes_heap_free(heap) heap16_free(&(heap)->bytesheap) +#define ppbytes_heap_info(heap, info, append) heap16_stats(&(heap)->bytesheap, info, append) + +#define ppbytes_take(heap, size) _heap16_take(&(heap)->bytesheap, size) +#define ppbytes_buffer_init(heap) heap16_buffer_init(&(heap)->bytesheap, &(heap)->bytesbuffer) +#define ppbytes_buffer(heap, atleast) heap16_buffer_some(&(heap)->bytesheap, &(heap)->bytesbuffer, atleast) + +#define ppstruct_heap heap64 +#define ppstruct_heap_init(heap, space, large, flags) (heap64_init(&(heap)->structheap, space, large, flags), heap64_head(&(heap)->structheap)) +#define ppstruct_heap_clear(heap) heap64_clear(&(heap)->structheap) +#define ppstruct_heap_free(heap) heap64_free(&(heap)->structheap) +#define ppstruct_heap_info(heap, info, append) heap64_stats(&(heap)->structheap, info, append) +#define ppstruct_take(heap, size) _heap64_take(&(heap)->structheap, size) + +typedef struct { + ppbytes_heap bytesheap; + ppstruct_heap structheap; + iof bytesbuffer; +} ppheap; + +ppbyte * ppbytes_flush (ppheap *heap, iof *O, size_t *psize); + +void ppheap_init (ppheap *heap); +void ppheap_free (ppheap *heap); +void ppheap_renew (ppheap *heap); + +#endif
\ No newline at end of file |