added new macro MEM_Alloc_Array

VER-2-0-4-PATCH
David Turner 25 years ago
parent 0f991b4312
commit 803a3fdf89
  1. 7
      include/freetype/internal/ftmemory.h

@ -98,9 +98,16 @@
#define MEM_Alloc( _pointer_, _size_ ) \
FT_Alloc( memory, _size_, (void**)&(_pointer_) )
#define MEM_Alloc_Array( _pointer_, _count_, _type_ ) \
FT_Alloc( memory, (_count_)*sizeof(_type_), (void**)&(_pointer_) )
#define MEM_Realloc( _pointer_, _current_, _size_ ) \
FT_Realloc( memory, _current_, _size_, (void**)&(_pointer_) )
#define MEM_Realloc_Array( _pointer_, _current_, _new_, _type_ ) \
FT_Realloc( memory, (_current_)*sizeof(_type_), \
(_new_)*sizeof(_type_), (void**)&(_pointer_) )
#define ALLOC( _pointer_, _size_ ) \
FT_SET_ERROR( MEM_Alloc( _pointer_, _size_ ) )

Loading…
Cancel
Save