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 754831 - autocleanups: Add GString type
autocleanups: Add GString type
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.45.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-09-10 12:58 UTC by Kalev Lember
Modified: 2015-09-21 12:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
autocleanups: Add GString type (2.33 KB, patch)
2015-09-10 12:59 UTC, Kalev Lember
committed Details | Review

Description Kalev Lember 2015-09-10 12:58:32 UTC
.
Comment 1 Kalev Lember 2015-09-10 12:59:02 UTC
Created attachment 311068 [details] [review]
autocleanups: Add GString type
Comment 2 Colin Walters 2015-09-10 13:01:35 UTC
Review of attachment 311068 [details] [review]:

LGTM
Comment 3 Kalev Lember 2015-09-10 13:12:40 UTC
Thanks!

Attachment 311068 [details] pushed as d19411a - autocleanups: Add GString type
Comment 4 Marc-Antoine Perennou 2015-09-20 15:49:06 UTC
Shouldn't that take a GString **string and then deal with *string?

usually if you g_autoptr(Foo) bar;

bar will be a Foo* and a Foo** will be passed to the cleanup func. Current implementation looks wrong
Comment 5 Matthias Clasen 2015-09-21 12:32:24 UTC
(In reply to Marc-Antoine Perennou from comment #4)
> Shouldn't that take a GString **string and then deal with *string?
> 
> usually if you g_autoptr(Foo) bar;
> 
> bar will be a Foo* and a Foo** will be passed to the cleanup func. Current
> implementation looks wrong

No, thats not true. Compare the other cleanup functions in glib-autocleanups.h: none of them takes a Foo**