summaryrefslogtreecommitdiffstats
path: root/include/internal/ftmemory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/internal/ftmemory.h')
-rw-r--r--include/internal/ftmemory.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/include/internal/ftmemory.h b/include/internal/ftmemory.h
index 3d51aee..c0c553b 100644
--- a/include/internal/ftmemory.h
+++ b/include/internal/ftmemory.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
-/* Copyright 1996-2002, 2004-2007, 2010, 2013 by */
+/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -215,11 +215,14 @@ FT_BEGIN_HEADER
#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 )
-#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count )
+#define FT_MEM_SET( dest, byte, count ) \
+ ft_memset( dest, byte, (FT_Offset)(count) )
-#define FT_MEM_COPY( dest, source, count ) ft_memcpy( dest, source, count )
+#define FT_MEM_COPY( dest, source, count ) \
+ ft_memcpy( dest, source, (FT_Offset)(count) )
-#define FT_MEM_MOVE( dest, source, count ) ft_memmove( dest, source, count )
+#define FT_MEM_MOVE( dest, source, count ) \
+ ft_memmove( dest, source, (FT_Offset)(count) )
#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0, count )
@@ -227,14 +230,19 @@ FT_BEGIN_HEADER
#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) )
-#define FT_ARRAY_ZERO( dest, count ) \
- FT_MEM_ZERO( dest, (count) * sizeof ( *(dest) ) )
+#define FT_ARRAY_ZERO( dest, count ) \
+ FT_MEM_ZERO( dest, \
+ (FT_Offset)(count) * sizeof ( *(dest) ) )
-#define FT_ARRAY_COPY( dest, source, count ) \
- FT_MEM_COPY( dest, source, (count) * sizeof ( *(dest) ) )
+#define FT_ARRAY_COPY( dest, source, count ) \
+ FT_MEM_COPY( dest, \
+ source, \
+ (FT_Offset)(count) * sizeof ( *(dest) ) )
-#define FT_ARRAY_MOVE( dest, source, count ) \
- FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) )
+#define FT_ARRAY_MOVE( dest, source, count ) \
+ FT_MEM_MOVE( dest, \
+ source, \
+ (FT_Offset)(count) * sizeof ( *(dest) ) )
/*