Update prototype of memory functions

to always get the memory context parameter
(even if it is not needed) to provide a cleaner
and simpler user interface
(instead of requesting the user to use directly m_context).
This commit is contained in:
Patrick Pelissier committed 2025-05-07 21:02:24 +02:00
1 parent f585167fa8
commit 3721129da1
19 files changed
+155 -118

No files matched your search

+2 -2
View File
@@ -68,8 +68,8 @@ static inline void overloaded_free(size_t st, void *ptr, size_t n)
free(p);
}
#define M_MEMORY_REALLOC(type, ptr, o, n) (type *) overloaded_realloc(sizeof(type), ptr, o, n)
#define M_MEMORY_FREE(type, ptr, o) overloaded_free(sizeof(type), ptr, o)
#define M_MEMORY_REALLOC(ctx, type, ptr, o, n) (type *) overloaded_realloc(sizeof(type), ptr, o, n)
#define M_MEMORY_FREE(ctx, type, ptr, o) overloaded_free(sizeof(type), ptr, o)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////