mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Override libtommath allocation procedures
This commit is contained in:
@@ -89,20 +89,20 @@ do { \
|
||||
#endif
|
||||
|
||||
/* define heap macros */
|
||||
#ifndef MP_MALLOC
|
||||
/* default to libc stuff */
|
||||
# include <stdlib.h>
|
||||
# define MP_MALLOC(size) malloc(size)
|
||||
# define MP_REALLOC(mem, oldsize, newsize) realloc((mem), (newsize))
|
||||
# define MP_CALLOC(nmemb, size) calloc((nmemb), (size))
|
||||
# define MP_FREE(mem, size) free(mem)
|
||||
#else
|
||||
// #ifndef MP_MALLOC
|
||||
// /* default to libc stuff */
|
||||
// # include <stdlib.h>
|
||||
// # define MP_MALLOC(size) malloc(size)
|
||||
// # define MP_REALLOC(mem, oldsize, newsize) realloc((mem), (newsize))
|
||||
// # define MP_CALLOC(nmemb, size) calloc((nmemb), (size))
|
||||
// # define MP_FREE(mem, size) free(mem)
|
||||
// #else
|
||||
/* prototypes for our heap functions */
|
||||
extern void *MP_MALLOC(size_t size);
|
||||
extern void *MP_REALLOC(void *mem, size_t oldsize, size_t newsize);
|
||||
extern void *MP_CALLOC(size_t nmemb, size_t size);
|
||||
extern void MP_FREE(void *mem, size_t size);
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
/* feature detection macro */
|
||||
#ifdef _MSC_VER
|
||||
|
||||
Reference in New Issue
Block a user