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 725972 - Handle some missing fundamental types in GObject [de]serialization
Handle some missing fundamental types in GObject [de]serialization
Status: RESOLVED FIXED
Product: json-glib
Classification: Core
Component: GObject
git master
Other Linux
: Normal normal
: ---
Assigned To: json-glib-maint
json-glib-maint
Depends on:
Blocks:
 
 
Reported: 2014-03-09 09:05 UTC by Tristan Van Berkom
Modified: 2014-12-30 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to handle gulong/glong/guint64 when [de]serializing pspecs. (1.93 KB, patch)
2014-03-09 09:05 UTC, Tristan Van Berkom
committed Details | Review
Test case involving glong, gulong, gint64, and guint64. (11.07 KB, text/plain)
2014-11-20 05:40 UTC, Andrew Robbins
  Details

Description Tristan Van Berkom 2014-03-09 09:05:08 UTC
Created attachment 271348 [details] [review]
Patch to handle gulong/glong/guint64 when [de]serializing pspecs.

Added some cases for glong and gulong in object deserialization, these
were already handled in serialization but missing in deserialization.

Also added handling of guint64, probably not ideal as a guint64 may not entirely
fit into a gint64, however [de]serializing with a simple cast by default is
probably better than not handling the type (it can be overridden by serializable
implementations if guint64 precision is really important for a given class).
Comment 1 Andrew Robbins 2014-11-12 21:31:10 UTC
I believe I have come across this bug too, I have a lot of models representing HTTP objects and use gint and guint as appropriate, and the serialization process seems to break on the guints.
Comment 2 Andrew Robbins 2014-11-20 05:40:48 UTC
Created attachment 291056 [details]
Test case involving glong, gulong, gint64, and guint64.
Comment 3 Emmanuele Bassi (:ebassi) 2014-12-30 11:30:05 UTC
attachment pushed to master, thanks for the patch.