util: define free_func_t

This commit is contained in:
Yu Watanabe
2018-12-02 06:34:25 +01:00
parent ee05335f43
commit e30f9c972b
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -8,6 +8,8 @@
#include "macro.h"
typedef void (*free_func_t)(void *p);
#define new(t, n) ((t*) malloc_multiply(sizeof(t), (n)))
#define new0(t, n) ((t*) calloc((n), sizeof(t)))