summaryrefslogtreecommitdiff
path: root/pango/pangox-fontcache.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-09-07 23:26:49 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-09-07 23:26:49 +0000
commited419fa5c98ca55f2a8dd0fea06633512964b2df (patch)
treee9d00bb45c39a0ccbdd95555930afad18a104172 /pango/pangox-fontcache.c
parent4e9d86a3e715f6c0806a2019def34153b02dea1c (diff)
downloadpango-ed419fa5c98ca55f2a8dd0fea06633512964b2df.tar.gz
Switch some g_new (*, 1) to g_slice_new ()... I know...
2007-09-07 Behdad Esfahbod <behdad@gnome.org> * pango/pangox-fontcache.c (free_cache_entry), (pango_x_font_cache_free), (pango_x_font_cache_new), (pango_x_font_cache_load): * pango/pangox-fontmap.c (pango_x_font_map_finalize), (pango_x_insert_font): * pango/pangox.c (free_context_info), (pango_x_get_context), (pango_x_font_init), (pango_x_font_get_metrics), (pango_x_insert_subfont), (free_metrics_info), (pango_x_font_finalize): Switch some g_new (*, 1) to g_slice_new ()... I know... svn path=/trunk/; revision=2422
Diffstat (limited to 'pango/pangox-fontcache.c')
-rw-r--r--pango/pangox-fontcache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pango/pangox-fontcache.c b/pango/pangox-fontcache.c
index ed556e74..8b169fab 100644
--- a/pango/pangox-fontcache.c
+++ b/pango/pangox-fontcache.c
@@ -60,7 +60,7 @@ free_cache_entry (char *xlfd,
g_free (entry->xlfd);
XFreeFont (cache->display, entry->fs);
- g_free (entry);
+ g_slice_free (CacheEntry, entry);
}
/**
@@ -81,6 +81,8 @@ pango_x_font_cache_free (PangoXFontCache *cache)
g_hash_table_destroy (cache->back);
g_list_free (cache->mru);
+
+ g_slice_free (PangoXFontCache, cache);
}
/**
@@ -99,7 +101,7 @@ pango_x_font_cache_new (Display *display)
g_return_val_if_fail (display != NULL, NULL);
- cache = g_new (PangoXFontCache, 1);
+ cache = g_slice_new (PangoXFontCache);
cache->display = display;
@@ -161,7 +163,7 @@ pango_x_font_cache_load (PangoXFontCache *cache,
if (!fs)
return NULL;
- entry = g_new (CacheEntry, 1);
+ entry = g_slice_new (CacheEntry);
entry->xlfd = g_strdup (xlfd);
entry->fs = fs;