Commit 803a3fdf89ef4b70ab0e54dde3b71a820fcbab21

David Turner 2000-06-07T20:04:56

added new macro MEM_Alloc_Array

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index 5875311..a9826dc 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/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_ ) )