| Index: third_party/freetype/include/internal/ftmemory.h
|
| diff --git a/core/src/fxge/fx_freetype/fxft2.5.01/include/freetype/internal/ftmemory.h b/third_party/freetype/include/internal/ftmemory.h
|
| similarity index 71%
|
| rename from core/src/fxge/fx_freetype/fxft2.5.01/include/freetype/internal/ftmemory.h
|
| rename to third_party/freetype/include/internal/ftmemory.h
|
| index 432a9ba6d85b7e1b7ab0face6778a124ab6b9507..3d51aeec69fd061bc6ed261efe456c1d2fa36ef4 100644
|
| --- a/core/src/fxge/fx_freetype/fxft2.5.01/include/freetype/internal/ftmemory.h
|
| +++ b/third_party/freetype/include/internal/ftmemory.h
|
| @@ -20,9 +20,9 @@
|
| #define __FTMEMORY_H__
|
|
|
|
|
| -#include "../../ft2build.h"
|
| -#include "../config/ftconfig.h"
|
| -#include "../fttypes.h"
|
| +#include <ft2build.h>
|
| +#include FT_CONFIG_CONFIG_H
|
| +#include FT_TYPES_H
|
|
|
|
|
| FT_BEGIN_HEADER
|
| @@ -135,53 +135,25 @@ 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
|
| -
|
|
|
| FT_BASE( void )
|
| ft_mem_free( FT_Memory memory,
|
| const void* P );
|
|
|
|
|
| +#define FT_MEM_ALLOC( ptr, size ) \
|
| + FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, \
|
| + (FT_Long)(size), \
|
| + &error ) )
|
| +
|
| #define FT_MEM_FREE( ptr ) \
|
| FT_BEGIN_STMNT \
|
| ft_mem_free( memory, (ptr) ); \
|
| (ptr) = NULL; \
|
| FT_END_STMNT
|
| -#ifndef _XYQ_MEM_DEBUG
|
| -#define FT_MEM_ALLOC( ptr, size ) \
|
| - FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, (size), &error ) )
|
|
|
| +#define FT_MEM_NEW( ptr ) \
|
| + FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) )
|
|
|
| #define FT_MEM_REALLOC( ptr, cursz, newsz ) \
|
| FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
|
| @@ -196,6 +168,9 @@ FT_BEGIN_HEADER
|
| (FT_Long)(size), \
|
| &error ) )
|
|
|
| +#define FT_MEM_QNEW( ptr ) \
|
| + FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) )
|
| +
|
| #define FT_MEM_QREALLOC( ptr, cursz, newsz ) \
|
| FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
|
| 1, \
|
| @@ -235,95 +210,7 @@ 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), \
|
| - (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 ) \
|
| - FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) )
|
|
|
| #define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 )
|
|
|
| @@ -366,6 +253,38 @@ FT_BEGIN_HEADER
|
| /* _typed_ in order to automatically compute array element sizes. */
|
| /* */
|
|
|
| +#define FT_MEM_NEW_ARRAY( ptr, count ) \
|
| + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
|
| + sizeof ( *(ptr) ), \
|
| + 0, \
|
| + (FT_Long)(count), \
|
| + NULL, \
|
| + &error ) )
|
| +
|
| +#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \
|
| + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
|
| + sizeof ( *(ptr) ), \
|
| + (FT_Long)(cursz), \
|
| + (FT_Long)(newsz), \
|
| + (ptr), \
|
| + &error ) )
|
| +
|
| +#define FT_MEM_QNEW_ARRAY( ptr, count ) \
|
| + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
|
| + sizeof ( *(ptr) ), \
|
| + 0, \
|
| + (FT_Long)(count), \
|
| + NULL, \
|
| + &error ) )
|
| +
|
| +#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \
|
| + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
|
| + sizeof ( *(ptr) ), \
|
| + (FT_Long)(cursz), \
|
| + (FT_Long)(newsz), \
|
| + (ptr), \
|
| + &error ) )
|
| +
|
| #define FT_ALLOC( ptr, size ) \
|
| FT_MEM_SET_ERROR( FT_MEM_ALLOC( ptr, size ) )
|
|
|
|
|