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 301171 - Adding Glib::KeyFile
Adding Glib::KeyFile
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Glib
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2005-04-19 10:09 UTC by Emmanuele Bassi (:ebassi)
Modified: 2005-04-26 23:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Glib::KeyFile glue code (7.43 KB, patch)
2005-04-19 10:12 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
Glib::KeyFile XS code (19.13 KB, text/plain)
2005-04-19 10:14 UTC, Emmanuele Bassi (:ebassi)
  Details
Glib::KeyFile test suite (802 bytes, text/plain)
2005-04-19 10:15 UTC, Emmanuele Bassi (:ebassi)
  Details
Glib::KeyFile XS code (19.06 KB, text/plain)
2005-04-20 15:51 UTC, Emmanuele Bassi (:ebassi)
  Details
Glib::KeyFile test suite (883 bytes, text/plain)
2005-04-20 15:52 UTC, Emmanuele Bassi (:ebassi)
  Details
Glib::KeyFile test suite (3.00 KB, text/plain)
2005-04-21 13:27 UTC, Emmanuele Bassi (:ebassi)
  Details

Description Emmanuele Bassi (:ebassi) 2005-04-19 10:09:28 UTC
Perl bindings for the GKeyFile object
Comment 1 Emmanuele Bassi (:ebassi) 2005-04-19 10:12:56 UTC
Created attachment 45435 [details] [review]
Glib::KeyFile glue code

The glue code for Glib::KeyFile, with the remarks from Torsten fro conditional
compilation.
Comment 2 Emmanuele Bassi (:ebassi) 2005-04-19 10:14:29 UTC
Created attachment 45436 [details]
Glib::KeyFile XS code

Glib::KeyFile XS, with *_list variants implemented, and muppet's remarks on
string freeing
Comment 3 Emmanuele Bassi (:ebassi) 2005-04-19 10:15:07 UTC
Created attachment 45437 [details]
Glib::KeyFile test suite

Glib::KeyFile test suite for use with make test
Comment 4 muppet 2005-04-19 12:23:52 UTC
In get_keys() and get_groups(), you return a list of strings, or undef if the C function returns no strings.  
in perl that means that whether the function returned anything or not,  @return > 0.  to check if there 
are keys, i have to explicitly check defined($ret[0]).  it would be easier to use (and code) if it returned an 
empty list instead of undef.


in the set_boolean case of set_boolean, you want SvTRUE rather than SvIV -- this will allow you to 
handle undef without warnings at runtime.  similarly, get_boolean should use boolSV for the new 
boolean output value instead of newSViv.  (yeah, 0 is false, but that's not perl's boolean false -- that's 
''.)  the same goes for the [sg]et_boolean_list ones.
Comment 5 Emmanuele Bassi (:ebassi) 2005-04-20 15:51:41 UTC
Created attachment 45491 [details]
Glib::KeyFile XS code

New XS file, implementing muppet's remarks
Comment 6 Emmanuele Bassi (:ebassi) 2005-04-20 15:52:34 UTC
Created attachment 45492 [details]
Glib::KeyFile test suite

New test suite, with a check for initial group state.
Comment 7 muppet 2005-04-20 18:38:30 UTC
I'm happy with the xs file now, but the test file looks a bit lean for as many
functions as the xs file creates.  ;-)
Comment 8 Emmanuele Bassi (:ebassi) 2005-04-21 13:27:43 UTC
Created attachment 45515 [details]
Glib::KeyFile test suite

Here's the latest test suite.

It will skip the tests if we are not using a Glib >= 2.6.0.
Comment 9 Emmanuele Bassi (:ebassi) 2005-04-25 19:14:27 UTC
If it's okay, I could commit it by tomorrow, in order to be included in the next
release of the 1.09x series.
Comment 10 Torsten Schoenfeld 2005-04-26 16:52:04 UTC
Everything looks fine to me.  Just a minor nag: the copyright disclaimer in the
XS file says 2003-2005.
Comment 11 Emmanuele Bassi (:ebassi) 2005-04-26 23:01:56 UTC
Committed the latest patch