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 664150 - Fix unboxing of integer GValues for property access
Fix unboxing of integer GValues for property access
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
: 666677 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-11-15 21:55 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2012-02-06 17:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix unboxing of uchar/schar GValues for property access (1.12 KB, patch)
2011-11-15 21:55 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
Test cases for gobject-introspection (9.88 KB, patch)
2012-02-05 11:01 UTC, Sebastian Pölsterl
committed Details | Review
Fix unboxing for integer types (6.33 KB, patch)
2012-02-05 11:03 UTC, Sebastian Pölsterl
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-11-15 21:55:03 UTC
We need to use the correct value accessors for schar/uchar types.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-11-15 21:55:04 UTC
Created attachment 201484 [details] [review]
Fix unboxing of uchar/schar GValues for property access
Comment 2 Tomeu Vizoso 2012-01-24 15:22:10 UTC
Comment on attachment 201484 [details] [review]
Fix unboxing of uchar/schar GValues for property access

Could someone merge the test case into the test suite? Ideally there would be a single patch. Thanks!
Comment 3 Tomeu Vizoso 2012-01-24 15:22:31 UTC
Comment on attachment 201484 [details] [review]
Fix unboxing of uchar/schar GValues for property access

Could someone add a test case? Ideally there would be a single patch. Thanks!
Comment 4 Sebastian Pölsterl 2012-02-04 15:50:09 UTC
This is similar to bug 666677, gimarshallingtests.c from gobject-introspection should cover this case.
Comment 5 Sebastian Pölsterl 2012-02-05 11:00:53 UTC
*** Bug 666677 has been marked as a duplicate of this bug. ***
Comment 6 Sebastian Pölsterl 2012-02-05 11:01:41 UTC
Created attachment 206809 [details] [review]
Test cases for gobject-introspection
Comment 7 Sebastian Pölsterl 2012-02-05 11:03:52 UTC
Created attachment 206810 [details] [review]
Fix unboxing for integer types

Retrieving "char" type properties does not work because somehow gobject-introspection thinks it is has a guint8 type tag.
Comment 8 Martin Pitt 2012-02-06 16:08:35 UTC
The patches look fine to me. It would be good if add the bug URL to the commit log when pushing those.

For the bool case, I'd recommend not commenting out the test case, and do

    @unittest.expectedFailure
    def test_char(self):

instead. That way, it stands out during running the tests as a real TODO item, but won't break distcheck or count as real failure.

Thanks!
Comment 9 Sebastian Pölsterl 2012-02-06 17:55:03 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.