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 744570 - GString is missing (transfer none) annotations on many of its methods
GString is missing (transfer none) annotations on many of its methods
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: introspection
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-02-15 19:01 UTC by Pavel Holejsovsky
Modified: 2016-02-02 16:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstring: Explictly annotate return-values with (transfer none/full) (7.15 KB, patch)
2016-02-02 10:20 UTC, Rico Tzschichholz
committed Details | Review

Description Pavel Holejsovsky 2015-02-15 19:01:06 UTC
Typical example is g_string_append(), which returns itself as an argument.  Without the annotation, GI assigns (transfer full) and this causes binding crash because of attempting to free the string instance multiple times.

Seems that every method of gstring.c which has "Returns: @string" would be benefitting from this.

Originally reported as:

https://github.com/pavouk/lgi/issues/102
Comment 1 Matthias Clasen 2015-02-17 23:32:41 UTC
A patch would be appreciated.
Comment 2 Rico Tzschichholz 2016-02-02 10:20:24 UTC
Created attachment 320255 [details] [review]
gstring: Explictly annotate return-values with (transfer none/full)
Comment 3 Emmanuele Bassi (:ebassi) 2016-02-02 16:19:52 UTC
Review of attachment 320255 [details] [review]:

Looks good.
Comment 4 Rico Tzschichholz 2016-02-02 16:40:11 UTC
Attachment 320255 [details] pushed as 927a4ed - gstring: Explictly annotate return-values with (transfer none/full)