From 7d931c845ebde4aa472835708e5c9ac4e66666b0 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 15 Aug 2013 07:55:20 -0400 Subject: [PATCH] Fix annotation for xdg_mime_list_parents There is a fatal crash in Sugar when retrieving mimetypes for some Journal entries when contructing the icon palette (for both the Journal list view and detail view). We isolated the problem to xdgmime.c, the call to xdg_get_mime_parents. Dnarvaez observed that the annotation for the return argument was missing and that the annotation for the return for mime_list_parents was wrong. This patch fixes these annotations. Fixes #4530 --- src/sugar3/xdgmime.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sugar3/xdgmime.c b/src/sugar3/xdgmime.c index ec8a6a30..9d51bc8a 100644 --- a/src/sugar3/xdgmime.c +++ b/src/sugar3/xdgmime.c @@ -762,7 +762,7 @@ xdg_mime_mime_type_subclass (const char *mime, /** * sugar_mime_list_mime_parents: * - * Return value: (array zero-terminated=1) (transfer full): + * Return value: (transfer container): **/ char ** xdg_mime_list_mime_parents (const char *mime) @@ -788,6 +788,11 @@ xdg_mime_list_mime_parents (const char *mime) return result; } +/** + * sugar_mime_get_mime_parents: + * + * Return value: (transfer none): + **/ const char ** xdg_mime_get_mime_parents (const char *mime) {