GNOME Bugzilla – Bug 614864
add g_key_file_get_int64, g_key_file_get_uint64 (from telepathy-glib)
Last modified: 2010-05-09 01:32:38 UTC
On gtk-devel-list, Andy Spencer requested a switch to gint64. Tor Lillqvist rejected this for compatibility reasons, and suggested adding separate accessors. telepathy-glib already needs to store 64-bit integers in keyfiles, so we added some accessor functions, tp_g_key_file_get_[u]int64, implemented in terms of g_key_file_get_value: http://git.collabora.co.uk/?p=telepathy-glib.git;a=blob;f=telepathy-glib/util.c;hb=master#l755 I'll submit a patch to add these to GLib (unless someone extracts them from telepathy-glib first :-) (Copyright status of those functions: © 2009 Collabora Ltd. / © 2009 Nokia Corporation.)
Sounds like a very reasonable addition.
Created attachment 160354 [details] [review] proposed implementation, with trivial smoke-test Also available as the g_key_file_get_int64 branch in my repository: * http://cgit.freedesktop.org/~smcv/glib/ * git://anongit.freedesktop.org/~smcv/glib
Implementation looks good to me. You probably want to update the copyright years to 2010. The test should ideally be added to the existing glib/tests/keyfile.c file. Please commit with that change.
Created attachment 160364 [details] [review] updated patch > Implementation looks good to me. > You probably want to update the copyright years to 2010. Indeed. > The test should ideally be added to the existing glib/tests/keyfile.c file. Oh, I'd wondered why /tests was smaller than I'd expected :-) make -C glib check now passes (I added these functions to glib.symbols, too). > Please commit with that change. I don't have GNOME git access (that I know of); if you're happy with the updated patch, please apply it, or merge it from my freedesktop.org repository.