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 301034 - add ref/unref to gkeyfile api
add ref/unref to gkeyfile api
Status: RESOLVED DUPLICATE of bug 590808
Product: glib
Classification: Platform
Component: general
2.6.x
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2005-04-18 08:03 UTC by Emmanuele Bassi (:ebassi)
Modified: 2011-02-18 16:11 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
The proposed patch for ref/unref (2.19 KB, patch)
2005-04-18 08:05 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
updated patch (use atomic refcounts) (3.84 KB, patch)
2009-12-15 10:40 UTC, Christian Persch
none Details | Review
updated patch (fixes a warning on g_key_file_free) (4.23 KB, patch)
2010-01-08 18:18 UTC, Christian Persch
none Details | Review

Description Emmanuele Bassi (:ebassi) 2005-04-18 08:03:39 UTC
in order to make this structure more "language bindings friendly" (for high
level languages especially), I added a ref_count field and the g_key_file_ref()
and g_key_file_unref() functions.
Comment 1 Emmanuele Bassi (:ebassi) 2005-04-18 08:05:06 UTC
Created attachment 45382 [details] [review]
The proposed patch for ref/unref

The new API is:

void g_key_file_ref   (GKeyFile *key_file);
void g_key_file_unref (GKeyFile *key_file);
Comment 2 Matthias Clasen 2005-04-28 20:58:23 UTC
I'll consider this
Comment 3 Matthias Clasen 2005-05-18 13:58:55 UTC
None of the other glib structures is refcounted. It would be odd to start doing
that for keyfile
Comment 4 Christian Persch 2009-12-15 10:40:23 UTC
Created attachment 149751 [details] [review]
updated patch (use atomic refcounts)
Comment 5 Emmanuele Bassi (:ebassi) 2009-12-23 23:18:54 UTC
now that GHashTable and other GLib structures are indeed refcounted we should probably re-investigate this.

thanks for the patch, Christian.
Comment 6 Christian Persch 2010-01-08 18:18:22 UTC
Created attachment 151048 [details] [review]
updated patch (fixes a warning on g_key_file_free)
Comment 7 Javier Jardón (IRC: jjardon) 2010-04-09 12:18:19 UTC
Marking this duplicate of bug #590808. There are updated patches there.

*** This bug has been marked as a duplicate of bug 590808 ***