forked from minhngoc25a/freetype2
Replace boolean allocation macros with MEM ones.
* src/base/ftbitmap.c (FT_Bitmap_Copy): Use MEM-macro. * src/base/ftobjs.c (ft_glyphslot_alloc_bitmap): Ditto. * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Ditto. * src/cache/ftccache.c (ftc_cache_init): Ditto * src/gzip/ftgzip.c (ft_gzip_alloc): Ditto. * src/psnames/psmodule.c (ps_unicodes_init): Ditto. * src/sfnt/sfobjs.c (sfnt_load_face): Ditto. * src/sfnt/ttload.c (tt_face_load_name): Ditto.
This commit is contained in:
parent
9a4c846e60
commit
49270c1701
|
@ -112,10 +112,10 @@
|
|||
target_size = (FT_ULong)target_pitch * target->rows;
|
||||
|
||||
if ( target_size != size )
|
||||
(void)FT_QREALLOC( target->buffer, target_size, size );
|
||||
FT_MEM_QREALLOC( target->buffer, target_size, size );
|
||||
}
|
||||
else
|
||||
(void)FT_QALLOC( target->buffer, size );
|
||||
FT_MEM_QALLOC( target->buffer, size );
|
||||
|
||||
if ( !error )
|
||||
{
|
||||
|
|
|
@ -535,7 +535,7 @@
|
|||
else
|
||||
slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
|
||||
|
||||
(void)FT_ALLOC( slot->bitmap.buffer, size );
|
||||
FT_MEM_ALLOC( slot->bitmap.buffer, size );
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
FT_Pointer p = NULL;
|
||||
|
||||
|
||||
(void)FT_QALLOC( p, sz );
|
||||
FT_MEM_QALLOC( p, sz );
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@
|
|||
cache->mask = FTC_HASH_INITIAL_SIZE - 1;
|
||||
cache->slack = FTC_HASH_INITIAL_SIZE * FTC_HASH_MAX_LOAD;
|
||||
|
||||
(void)FT_NEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 );
|
||||
FT_MEM_NEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 );
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
|
||||
|
||||
/* allocate and zero out */
|
||||
(void)FT_ALLOC( p, sz );
|
||||
FT_MEM_ALLOC( p, sz );
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
|
@ -389,9 +389,9 @@
|
|||
/* Reallocate if the number of used entries is much smaller. */
|
||||
if ( count < num_glyphs / 2 )
|
||||
{
|
||||
(void)FT_QRENEW_ARRAY( table->maps,
|
||||
num_glyphs + EXTRA_GLYPH_LIST_SIZE,
|
||||
count );
|
||||
FT_MEM_QRENEW_ARRAY( table->maps,
|
||||
num_glyphs + EXTRA_GLYPH_LIST_SIZE,
|
||||
count );
|
||||
error = FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
|
|
@ -1238,7 +1238,7 @@
|
|||
}
|
||||
|
||||
/* reduce array size to the actually used elements */
|
||||
(void)FT_QRENEW_ARRAY( sbit_strike_map, count, bsize_idx );
|
||||
FT_MEM_QRENEW_ARRAY( sbit_strike_map, count, bsize_idx );
|
||||
|
||||
/* from now on, all strike indices are mapped */
|
||||
/* using `sbit_strike_map' */
|
||||
|
|
|
@ -993,9 +993,9 @@
|
|||
|
||||
/* reduce array size to the actually used elements */
|
||||
count = (FT_UInt)( entry - table->names );
|
||||
(void)FT_QRENEW_ARRAY( table->names,
|
||||
table->numNameRecords,
|
||||
count );
|
||||
FT_MEM_QRENEW_ARRAY( table->names,
|
||||
table->numNameRecords,
|
||||
count );
|
||||
table->numNameRecords = count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue