After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682514 - eval_pos_init_editpos docs
eval_pos_init_editpos docs
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-08-23 00:50 UTC by Morten Welinder
Modified: 2012-11-14 09:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2012-08-23 00:50:02 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.
Comment 1 Morten Welinder 2012-08-23 00:53:18 UTC
Jean, is there an introspection reason for that annotation?
Comment 2 Jean Bréfort 2012-08-25 13:38:42 UTC
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.
Comment 3 Andreas J. Guelzow 2012-11-11 20:49:09 UTC
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.
 */
Comment 4 Andreas J. Guelzow 2012-11-14 04:45:54 UTC
@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?
Comment 5 Jean Bréfort 2012-11-14 09:35:17 UTC
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