summaryrefslogtreecommitdiffstats
path: root/include/freetype/internal/ftmemory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/freetype/internal/ftmemory.h')
-rw-r--r--include/freetype/internal/ftmemory.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index c0c553b..fc33b2f 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
-/* Copyright 1996-2015 by */
+/* Copyright 1996-2016 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,8 @@
/***************************************************************************/
-#ifndef __FTMEMORY_H__
-#define __FTMEMORY_H__
+#ifndef FTMEMORY_H_
+#define FTMEMORY_H_
#include <ft2build.h>
@@ -65,13 +65,15 @@ FT_BEGIN_HEADER
#ifdef __cplusplus
- extern "C++"
+extern "C++"
+{
template <typename T> inline T*
cplusplus_typeof( T*,
void *v )
{
return static_cast <T*> ( v );
}
+}
#define FT_ASSIGNP( p, val ) (p) = cplusplus_typeof( (p), (val) )
@@ -106,10 +108,12 @@ FT_BEGIN_HEADER
/*
* The allocation functions return a pointer, and the error code
- * is written to through the `p_error' parameter. See below for
- * for documentation.
+ * is written to through the `p_error' parameter.
*/
+ /* The `q' variants of the functions below (`q' for `quick') don't fill */
+ /* the allocated or reallocated memory with zero bytes. */
+
FT_BASE( FT_Pointer )
ft_mem_alloc( FT_Memory memory,
FT_Long size,
@@ -141,6 +145,9 @@ FT_BEGIN_HEADER
const void* P );
+ /* The `Q' variants of the macros below (`Q' for `quick') don't fill */
+ /* the allocated or reallocated memory with zero bytes. */
+
#define FT_MEM_ALLOC( ptr, size ) \
FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, \
(FT_Long)(size), \
@@ -380,7 +387,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* __FTMEMORY_H__ */
+#endif /* FTMEMORY_H_ */
/* END */