update: changed some stuff
This commit is contained in:
parent
78b9506885
commit
cfbb84c028
10 changed files with 31 additions and 51 deletions
|
|
@ -14,39 +14,39 @@
|
|||
#include "aq/libc_wrapper.h"
|
||||
#include "me/types.h"
|
||||
|
||||
void *__libc_malloc(t_usize size);
|
||||
void *__libc_calloc(t_usize size, t_usize elem);
|
||||
void *__libc_realloc(void *ptr, t_usize size);
|
||||
void *__libc_reallocarray(void *ptr, t_usize size, t_usize elem);
|
||||
void __libc_free(void *ptr);
|
||||
void *malloc(t_usize size);
|
||||
void *calloc(t_usize size, t_usize elem);
|
||||
void *realloc(void *ptr, t_usize size);
|
||||
void *reallocarray(void *ptr, t_usize size, t_usize elem);
|
||||
void free(void *ptr);
|
||||
|
||||
void *lc_malloc(t_allocator *self, t_usize size)
|
||||
{
|
||||
(void)(self);
|
||||
return (__libc_malloc(size));
|
||||
return (malloc(size));
|
||||
}
|
||||
|
||||
void *lc_calloc(t_allocator *self, t_usize size, t_usize elem)
|
||||
{
|
||||
(void)(self);
|
||||
return (__libc_calloc(size, elem));
|
||||
return (calloc(size, elem));
|
||||
}
|
||||
|
||||
void *lc_realloc(t_allocator *self, void *ptr, t_usize size)
|
||||
{
|
||||
(void)(self);
|
||||
return (__libc_realloc(ptr, size));
|
||||
return (realloc(ptr, size));
|
||||
}
|
||||
|
||||
void *lc_realloc_array(t_allocator *self, void *ptr, t_usize size,
|
||||
t_usize elem)
|
||||
{
|
||||
(void)(self);
|
||||
return (__libc_reallocarray(ptr, size, elem));
|
||||
return (reallocarray(ptr, size, elem));
|
||||
}
|
||||
|
||||
void lc_free(t_allocator *self, void *ptr)
|
||||
{
|
||||
(void)(self);
|
||||
return (__libc_free(ptr));
|
||||
return (free(ptr));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue