From 0cea6a642e27db93b87e61924bc4aa66d8770400 Mon Sep 17 00:00:00 2001 From: Pranav Rajpal <78008260+pranavrajpal@users.noreply.github.com> Date: Mon, 19 Apr 2021 21:45:58 -0700 Subject: [PATCH] Replace alloc function declarations with defines Replace the GPAC wrappers around the malloc-style functions (gf_malloc, gf_free, etc.) with defines that use the standard C versions of these functions so that we can avoid including GPAC's alloc.c --- src/thirdparty/gpacmp4/gpac/setup.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/thirdparty/gpacmp4/gpac/setup.h b/src/thirdparty/gpacmp4/gpac/setup.h index cc101f33..4fd8c616 100644 --- a/src/thirdparty/gpacmp4/gpac/setup.h +++ b/src/thirdparty/gpacmp4/gpac/setup.h @@ -687,33 +687,33 @@ u64 gf_memory_size(); /*gets memory allocated in bytes*/ /*! free memory allocated with gpac \param ptr same as free() */ -void gf_free(void *ptr); +#define gf_free free /*! allocates memory, shall be freed using \ref gf_free \param size same as malloc() \return adress of allocated block */ -void* gf_malloc(size_t size); +#define gf_malloc malloc /*! allocates memory array, shall be freed using \ref gf_free \param num same as calloc() \param size_of same as calloc() \return adress of allocated block */ -void* gf_calloc(size_t num, size_t size_of); +#define gf_calloc calloc /*! duplicates string, shall be freed using \ref gf_free \param str same as strdup() \return duplicated string */ -char* gf_strdup(const char *str); +#define gf_strdup strdup /*! reallocates memory, shall be freed using \ref gf_free \param ptr same as realloc() \param size same as realloc() \return adress of reallocated block */ -void* gf_realloc(void *ptr, size_t size); +#define gf_realloc realloc #endif /*! @} */