mirror of
https://github.com/janet-lang/janet
synced 2025-10-31 23:53:02 +00:00
Merge commit 'f4c9064b79d5b32fd74e5ddf25266356c22dd53b'
This commit is contained in:
@@ -1892,6 +1892,24 @@ JANET_API JanetThread *janet_thread_current(void);
|
||||
|
||||
#endif
|
||||
|
||||
/* Custom allocator support */
|
||||
JANET_API void *(janet_malloc)(size_t);
|
||||
JANET_API void *(janet_realloc)(void *, size_t);
|
||||
JANET_API void *(janet_calloc)(size_t, size_t);
|
||||
JANET_API void (janet_free)(void *);
|
||||
#ifndef janet_malloc
|
||||
#define janet_malloc(X) malloc((X))
|
||||
#endif
|
||||
#ifndef janet_realloc
|
||||
#define janet_realloc(X, Y) realloc((X), (Y))
|
||||
#endif
|
||||
#ifndef janet_calloc
|
||||
#define janet_calloc(X, Y) calloc((X), (Y))
|
||||
#endif
|
||||
#ifndef janet_free
|
||||
#define janet_free(X) free((X))
|
||||
#endif
|
||||
|
||||
/***** END SECTION MAIN *****/
|
||||
|
||||
/* Re-enable popped variable length array warnings */
|
||||
|
||||
Reference in New Issue
Block a user