tcc.h libtcc.c: remove unused defines

pretty sure that functions with use_* do not exist
and attempts to use the macros will fail to link
I could rename them to be more up to date like tcc_malloc,
but to me overloading the std calls with macros is
probably taking away control from the programmer,
so for the best is to just get rid of them.
This commit is contained in:
Kyryl Melekhin 2020-11-01 15:24:45 +00:00
parent 53587ee415
commit 985d963745
2 changed files with 0 additions and 9 deletions

View File

@ -421,10 +421,6 @@ PUB_FUNC void tcc_memcheck(void)
}
#endif /* MEM_DEBUG */
#define free(p) use_tcc_free(p)
#define malloc(s) use_tcc_malloc(s)
#define realloc(p, s) use_tcc_realloc(p, s)
/********************************************************/
/* dynarrays */

5
tcc.h
View File

@ -1229,11 +1229,6 @@ PUB_FUNC void *tcc_realloc_debug(void *ptr, unsigned long size, const char *file
PUB_FUNC char *tcc_strdup_debug(const char *str, const char *file, int line);
#endif
#define free(p) use_tcc_free(p)
#define malloc(s) use_tcc_malloc(s)
#define realloc(p, s) use_tcc_realloc(p, s)
#undef strdup
#define strdup(s) use_tcc_strdup(s)
PUB_FUNC void _tcc_error_noabort(const char *fmt, ...) PRINTF_LIKE(1,2);
PUB_FUNC NORETURN void _tcc_error(const char *fmt, ...) PRINTF_LIKE(1,2);
PUB_FUNC void _tcc_warning(const char *fmt, ...) PRINTF_LIKE(1,2);