mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
Better MALLOC macro.
This commit is contained in:
parent
9fae45306e
commit
dee4d7f801
@ -32,7 +32,7 @@
|
||||
#define SPINE_EXTENSION_H_
|
||||
|
||||
/* All allocation uses these. */
|
||||
#define MALLOC(TYPE,COUNT) ((TYPE*)_malloc(sizeof(TYPE) * COUNT, __FILE__, __LINE__))
|
||||
#define MALLOC(TYPE,COUNT) ((TYPE*)_malloc(sizeof(TYPE) * (COUNT), __FILE__, __LINE__))
|
||||
#define CALLOC(TYPE,COUNT) ((TYPE*)_calloc(COUNT, sizeof(TYPE), __FILE__, __LINE__))
|
||||
#define NEW(TYPE) CALLOC(TYPE,1)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user