Commit 77e5a2fb authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

usp10: Use heap_alloc_zero() instead of HeapAlloc() with HEAP_ZERO_MEMORY.

parent 0bf31be7
......@@ -2472,7 +2472,7 @@ static void GSUB_initialize_script_cache(ScriptCache *psc)
TRACE("initializing %i scripts in this font\n",psc->script_count);
if (psc->script_count)
{
psc->scripts = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(LoadedScript) * psc->script_count);
psc->scripts = heap_alloc_zero(psc->script_count * sizeof(*psc->scripts));
for (i = 0; i < psc->script_count; i++)
{
int offset = GET_BE_WORD(script->ScriptRecord[i].Script);
......@@ -2504,7 +2504,7 @@ static void GPOS_expand_script_cache(ScriptCache *psc)
TRACE("initializing %i scripts in this font\n",psc->script_count);
if (psc->script_count)
{
psc->scripts = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(LoadedScript) * psc->script_count);
psc->scripts = heap_alloc_zero(psc->script_count * sizeof(*psc->scripts));
for (i = 0; i < psc->script_count; i++)
{
int offset = GET_BE_WORD(script->ScriptRecord[i].Script);
......@@ -2602,7 +2602,7 @@ static void GSUB_initialize_language_cache(LoadedScript *script)
{
TRACE("Deflang %p, LangCount %i\n",script->default_language.gsub_table, script->language_count);
script->languages = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LoadedLanguage) * script->language_count);
script->languages = heap_alloc_zero(script->language_count * sizeof(*script->languages));
for (i = 0; i < script->language_count; i++)
{
......@@ -2639,7 +2639,7 @@ static void GPOS_expand_language_cache(LoadedScript *script)
int i;
script->language_count = count;
script->languages = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LoadedLanguage) * script->language_count);
script->languages = heap_alloc_zero(script->language_count * sizeof(*script->languages));
for (i = 0; i < script->language_count; i++)
{
......
......@@ -708,21 +708,6 @@ typedef struct {
WORD target;
} FindGlyph_struct;
static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
{
return HeapAlloc(GetProcessHeap(), 0, size);
}
static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
}
static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
/* TODO Fix font properties on Arabic locale */
static inline BOOL set_cache_font_properties(const HDC hdc, ScriptCache *sc)
{
......
......@@ -212,6 +212,21 @@ typedef struct {
enum {lex_Halant, lex_Composed_Vowel, lex_Matra_post, lex_Matra_pre, lex_Matra_above, lex_Matra_below, lex_ZWJ, lex_ZWNJ, lex_NBSP, lex_Modifier, lex_Vowel, lex_Consonant, lex_Generic, lex_Ra, lex_Vedic, lex_Anudatta, lex_Nukta};
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
{
return HeapAlloc(GetProcessHeap(), 0, size);
}
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
}
static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
static inline BOOL is_consonant( int type )
{
return (type == lex_Ra || type == lex_Consonant);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment