GNOME Bugzilla – Bug 682514
eval_pos_init_editpos docs
Last modified: 2012-11-14 09:35:17 UTC
I don't like * @ep: (transfer full): The position to init. ... * Returns: (transfer full): the initialized #GnmEvalPos (@ep). There is no transfer of ownership in either direction. The original @ep remains valid and he function returns it.
Jean, is there an introspection reason for that annotation?
I am not sure what should be done in such cases. The two annotations just sazy that only the returned value need to be freed. Of course a (transfer none) annotation on Returns would say the same thing, but what happens if the caller frees @ep and accesses the returned value? I did not find analogs in gtk+, but there might be some.
Isn't this essentially the same situation as with g_string_ascii_up () that function takes a GString and passes back the same GString (just slightly modified). For those functions glib says: /** * g_string_ascii_up: * @string: a GString * * Converts all lowercase ASCII letters to uppercase ASCII letters. * * Return value: passed-in @string pointer, with all the * lowercase characters converted to uppercase in place, * with semantics that exactly match g_ascii_toupper(). */ /** * g_string_down: * @string: a #GString * * Converts a #GString to lowercase. * * Returns: the #GString * * Deprecated:2.2: This function uses the locale-specific * tolower() function, which is almost never the right thing. * Use g_string_ascii_down() or g_utf8_strdown() instead. */
@Jean, Morten suggests we do something like is done for GString. Since I don't know how to really test whether introspection is accepting that, could you makae the appropriate change please?
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report. Replaced all such annotations in position.c