feat: expose the allocator and array header files for external scanners
This commit is contained in:
parent
52d69790f3
commit
f1eecf9786
12 changed files with 326 additions and 82 deletions
|
|
@ -29,10 +29,10 @@ static void *ts_realloc_default(void *buffer, size_t size) {
|
|||
}
|
||||
|
||||
// Allow clients to override allocation functions dynamically
|
||||
void *(*ts_current_malloc)(size_t) = ts_malloc_default;
|
||||
void *(*ts_current_calloc)(size_t, size_t) = ts_calloc_default;
|
||||
void *(*ts_current_realloc)(void *, size_t) = ts_realloc_default;
|
||||
void (*ts_current_free)(void *) = free;
|
||||
TS_PUBLIC void *(*ts_current_malloc)(size_t) = ts_malloc_default;
|
||||
TS_PUBLIC void *(*ts_current_calloc)(size_t, size_t) = ts_calloc_default;
|
||||
TS_PUBLIC void *(*ts_current_realloc)(void *, size_t) = ts_realloc_default;
|
||||
TS_PUBLIC void (*ts_current_free)(void *) = free;
|
||||
|
||||
void ts_set_allocator(
|
||||
void *(*new_malloc)(size_t size),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue