Graph
This commit is contained in:
@@ -71,7 +71,13 @@ void* c_Allocator_Alloc(c_Allocator_t* self, c_size_t nBytes) {
|
||||
|
||||
C_STATIC_FORCE_INLINE
|
||||
void* c_Allocator_Realloc(c_Allocator_t* self, void* ptr, c_size_t nOldSize, c_size_t nNewSize) {
|
||||
if (!self || !ptr || nNewSize==0 || !self->realloc) return NULL;
|
||||
if (!self || nNewSize==0) return NULL;
|
||||
|
||||
if (ptr==NULL || nOldSize==0) {
|
||||
return c_Allocator_Alloc(self, nNewSize);
|
||||
}
|
||||
|
||||
if (!self->realloc) return NULL;
|
||||
return self->realloc(ptr, nOldSize, nNewSize, self->ud);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user