Browse Source

NEW macro calls CALLOC macro

Stephen Gowen 7 years ago
parent
commit
0b28d385db
1 changed files with 1 additions and 1 deletions
  1. 1 1
      spine-cpp/spine-cpp/include/spine/Extension.h

+ 1 - 1
spine-cpp/spine-cpp/include/spine/Extension.h

@@ -38,7 +38,7 @@
 /* All allocation uses these. */
 #define MALLOC(TYPE,COUNT) ((TYPE*)SPINE_EXTENSION->spineAlloc(sizeof(TYPE) * (COUNT), __FILE__, __LINE__))
 #define CALLOC(TYPE,COUNT) ((TYPE*)SPINE_EXTENSION->spineCalloc(COUNT, sizeof(TYPE), __FILE__, __LINE__))
-#define NEW(TYPE) ((TYPE*)SPINE_EXTENSION->spineAlloc(sizeof(TYPE), __FILE__, __LINE__))
+#define NEW(TYPE) CALLOC(TYPE,1)
 #define REALLOC(PTR,TYPE,COUNT) ((TYPE*)SPINE_EXTENSION->spineRealloc(PTR, sizeof(TYPE) * (COUNT), __FILE__, __LINE__))
 
 /* Frees memory. Can be used on const types. */