diff options
Diffstat (limited to 'core/include/thirdparties/freetype/freetype/internal/ftmemory.h')
-rw-r--r-- | core/include/thirdparties/freetype/freetype/internal/ftmemory.h | 238 |
1 files changed, 119 insertions, 119 deletions
diff --git a/core/include/thirdparties/freetype/freetype/internal/ftmemory.h b/core/include/thirdparties/freetype/freetype/internal/ftmemory.h index 67cbf43308..432a9ba6d8 100644 --- a/core/include/thirdparties/freetype/freetype/internal/ftmemory.h +++ b/core/include/thirdparties/freetype/freetype/internal/ftmemory.h @@ -135,37 +135,37 @@ FT_BEGIN_HEADER FT_Long new_count, void* block, FT_Error *p_error ); -#ifdef _DEBUG
-//#define _XYQ_MEM_DEBUG
-#endif
-
-#ifdef _XYQ_MEM_DEBUG /* XYQ */
- FT_BASE( FT_Pointer )
- ft_mem_allocdebug( FT_Memory memory,
- FT_Long size, const char* filename, int line,
- FT_Error *p_error );
-
- FT_BASE( FT_Pointer )
- ft_mem_qallocdebug( FT_Memory memory,
- FT_Long size, const char* filename, int line,
- FT_Error *p_error );
-
- FT_BASE( FT_Pointer )
- ft_mem_reallocdebug( FT_Memory memory,
- FT_Long item_size,
- FT_Long cur_count,
- FT_Long new_count,
- void* block, const char* filename, int line,
- FT_Error *p_error );
-
- FT_BASE( FT_Pointer )
- ft_mem_qreallocdebug( FT_Memory memory,
- FT_Long item_size,
- FT_Long cur_count,
- FT_Long new_count,
- void* block, const char* filename, int line,
- FT_Error *p_error );
-#endif
+#ifdef _DEBUG +//#define _XYQ_MEM_DEBUG +#endif + +#ifdef _XYQ_MEM_DEBUG /* XYQ */ + FT_BASE( FT_Pointer ) + ft_mem_allocdebug( FT_Memory memory, + FT_Long size, const char* filename, int line, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_qallocdebug( FT_Memory memory, + FT_Long size, const char* filename, int line, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_reallocdebug( FT_Memory memory, + FT_Long item_size, + FT_Long cur_count, + FT_Long new_count, + void* block, const char* filename, int line, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_qreallocdebug( FT_Memory memory, + FT_Long item_size, + FT_Long cur_count, + FT_Long new_count, + void* block, const char* filename, int line, + FT_Error *p_error ); +#endif FT_BASE( void ) @@ -178,8 +178,8 @@ FT_BEGIN_HEADER ft_mem_free( memory, (ptr) ); \ (ptr) = NULL; \ FT_END_STMNT -#ifndef _XYQ_MEM_DEBUG
-#define FT_MEM_ALLOC( ptr, size ) \
+#ifndef _XYQ_MEM_DEBUG +#define FT_MEM_ALLOC( ptr, size ) \ FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, (size), &error ) ) @@ -235,94 +235,94 @@ FT_BEGIN_HEADER (FT_Long)(newcnt), \ (ptr), \ &error ) ) -#define FT_MEM_NEW_ARRAY( ptr, count ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \
- 0, (count), \
- NULL, &error ) )
-
-#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \
- (cursz), (newsz), \
- (ptr), &error ) )
-
-#define FT_MEM_QNEW_ARRAY( ptr, count ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \
- 0, (count), \
- NULL, &error ) )
-
-#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \
- (cursz), (newsz), \
- (ptr), &error ) )
-
-#else
-#define FT_MEM_ALLOC( ptr, size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_allocdebug( memory, (size), __FILE__, __LINE__, &error ) )
-
-#define FT_MEM_REALLOC( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, 1, \
- (cursz), (newsz), \
- (ptr), __FILE__, __LINE__, &error ) )
-
-#define FT_MEM_QALLOC( ptr, size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qallocdebug( memory, (size), __FILE__, __LINE__, &error ) )
-
-#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, 1, \
- (cursz), (newsz), \
- (ptr), __FILE__, __LINE__, &error ) )
-
-#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, (item_size), \
- 0, (count), \
- NULL, __FILE__, __LINE__, &error ) )
-
-#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, (itmsz), \
- (oldcnt), (newcnt), \
+#define FT_MEM_NEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#define FT_MEM_QNEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#else +#define FT_MEM_ALLOC( ptr, size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_allocdebug( memory, (size), __FILE__, __LINE__, &error ) ) + +#define FT_MEM_REALLOC( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, 1, \ + (cursz), (newsz), \ + (ptr), __FILE__, __LINE__, &error ) ) + +#define FT_MEM_QALLOC( ptr, size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qallocdebug( memory, (size), __FILE__, __LINE__, &error ) ) + +#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, 1, \ + (cursz), (newsz), \ + (ptr), __FILE__, __LINE__, &error ) ) + +#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, (item_size), \ + 0, (count), \ + NULL, __FILE__, __LINE__, &error ) ) + +#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, (itmsz), \ + (oldcnt), (newcnt), \ + (ptr), __FILE__, __LINE__, &error ) ) + +#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, (item_size), \ + 0, (count), \ + NULL, __FILE__, __LINE__, &error ) ) + +#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, (itmsz), \ + (oldcnt), (newcnt), \ + (ptr), __FILE__, __LINE__, &error ) ) + /*************************************************************************/ + /* */ + /* The following functions macros expect that their pointer argument is */ + /* _typed_ in order to automatically compute array element sizes. */ + /* */ + +#define FT_MEM_NEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, sizeof ( *(ptr) ), \ + 0, (count), \ + NULL, __FILE__, __LINE__, &error ) ) + +#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ (ptr), __FILE__, __LINE__, &error ) ) -#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, (item_size), \
- 0, (count), \
- NULL, __FILE__, __LINE__, &error ) )
-
-#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, (itmsz), \
- (oldcnt), (newcnt), \
- (ptr), __FILE__, __LINE__, &error ) )
- /*************************************************************************/
- /* */
- /* The following functions macros expect that their pointer argument is */
- /* _typed_ in order to automatically compute array element sizes. */
- /* */
-
-#define FT_MEM_NEW_ARRAY( ptr, count ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, sizeof ( *(ptr) ), \
- 0, (count), \
- NULL, __FILE__, __LINE__, &error ) )
-
-#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_reallocdebug( memory, sizeof ( *(ptr) ), \
- (cursz), (newsz), \
- (ptr), __FILE__, __LINE__, &error ) )
-
-#define FT_MEM_QNEW_ARRAY( ptr, count ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, sizeof ( *(ptr) ), \
- 0, (count), \
- NULL, __FILE__, __LINE__, &error ) )
-
-#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, sizeof ( *(ptr) ), \
- (cursz), (newsz), \
- (ptr), __FILE__, __LINE__, &error ) )
-
-#endif
-
-#define FT_MEM_NEW( ptr ) \
- FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) )
-
-#define FT_MEM_QNEW( ptr ) \
+#define FT_MEM_QNEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, sizeof ( *(ptr) ), \ + 0, (count), \ + NULL, __FILE__, __LINE__, &error ) ) + +#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qreallocdebug( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ + (ptr), __FILE__, __LINE__, &error ) ) + +#endif + +#define FT_MEM_NEW( ptr ) \ + FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) ) + +#define FT_MEM_QNEW( ptr ) \ FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) ) #define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 ) |