summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-05-09 04:30:49 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-05-09 04:30:49 +0000
commit91b20d0e1ac51e5502f58f0e561791ab6c7f356e (patch)
tree92b879e242a032f8ab4ef36e555731956d5848eb /pango/pango-context.c
parentf8f1c0229fb4444706d863ef9c588df96460a3a4 (diff)
downloadpango-91b20d0e1ac51e5502f58f0e561791ab6c7f356e.tar.gz
Fix memory leak by freeing correct list.
Tue May 9 03:22:11 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_check_lines): Fix memory leak by freeing correct list. * pango/pango-context.c (pango_context_get_font_description): Change to return a pointer to the context's font description instead of a copy. Not quite 100% kosher but a lot more efficient than the previous. (Should we just refcount font descriptions and get it over with?)
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index a0134eb4..9b1db987 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -377,15 +377,15 @@ pango_context_set_font_description (PangoContext *context,
*
* Retrieve the default font description for the context.
*
- * Return value: a newly allocated copy of the contexts default font description.
- * This value must be free with pango_font_description_free()
+ * Return value: a pointer to the context's default font description.
+ * This value must not be modified or freed.
**/
PangoFontDescription *
pango_context_get_font_description (PangoContext *context)
{
g_return_val_if_fail (context != NULL, NULL);
- return pango_font_description_copy (context->font_desc);
+ return context->font_desc;
}
/**