/[freetype]/freetype2/include/freetype/internal/ftmemory.h
ViewVC logotype

Diff of /freetype2/include/freetype/internal/ftmemory.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by wl, Thu Mar 10 15:49:45 2005 UTC revision 1.37 by freetype, Tue Mar 15 23:31:48 2005 UTC
# Line 270  FT_BEGIN_HEADER Line 270  FT_BEGIN_HEADER
270  #define FT_ARRAY_MOVE( dest, source, count )                        \  #define FT_ARRAY_MOVE( dest, source, count )                        \
271            FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) )            FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) )
272    
273    /* return the maximum number of adressable elements in an array
274     * we limit ourselves to INT_MAX, rather than UINT_MAX, to avoid
275     * any problems
276     */
277    #define FT_ARRAY_MAX( ptr )    (FT_INT_MAX/sizeof( *(ptr) ))
278    
279    #define FT_ARRAY_CHECK( ptr, count )   ( (count) <= FT_ARRAY_MAX(ptr) )
280    
281    /*************************************************************************/    /*************************************************************************/
282    /*                                                                       */    /*                                                                       */
# Line 413  FT_BEGIN_HEADER Line 420  FT_BEGIN_HEADER
420            FT_REALLOC( _pointer, (_old_) * sizeof ( _type_ ),  \            FT_REALLOC( _pointer, (_old_) * sizeof ( _type_ ),  \
421                                  (_new_) * sizeof ( _type_ ) )                                  (_new_) * sizeof ( _type_ ) )
422    
423    
424   /* */   /* */
425    
426    

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26