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 688128 - Special case GValues in signals and properties
Special case GValues in signals and properties
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2012-11-11 22:56 UTC by Giovanni Campagna
Modified: 2017-04-13 00:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Special case GValues in signals and properties (1.39 KB, patch)
2012-11-11 22:56 UTC, Giovanni Campagna
none Details | Review
tests: Add marshalling tests for GValue-valued properties (3.51 KB, patch)
2017-04-04 05:10 UTC, Philip Chimento
committed Details | Review
value: Special case GValues in signals and properties (2.88 KB, patch)
2017-04-04 05:50 UTC, Philip Chimento
committed Details | Review
tests: Various GValue test fixes (3.11 KB, patch)
2017-04-04 05:50 UTC, Philip Chimento
committed Details | Review

Description Giovanni Campagna 2012-11-11 22:56:08 UTC
An old patch I had lying around. I don't remember what it was needed for.
Comment 1 Giovanni Campagna 2012-11-11 22:56:11 UTC
Created attachment 228739 [details] [review]
Special case GValues in signals and properties

If gjs is handling a GValue that itself holds a GValue, such as a
signal argument or a property, it should marshal the JS value into
a GValue and then set it as a boxed type, as otherwise there is no
way to build a JS boxed wrapping a GValue.
Comment 2 Giovanni Campagna 2014-01-19 13:57:32 UTC
Review ping!
Comment 3 Philip Chimento 2017-04-04 05:10:03 UTC
Created attachment 349210 [details] [review]
tests: Add marshalling tests for GValue-valued properties

This is to test GJS's support of GValues boxed inside GValues.
Comment 4 Philip Chimento 2017-04-04 05:50:05 UTC
Created attachment 349211 [details] [review]
value: Special case GValues in signals and properties

If gjs is handling a GValue that itself holds a GValue, such as a
signal argument or a property, it should marshal the JS value into
a GValue and then set it as a boxed type, as otherwise there is no
way to build a JS boxed wrapping a GValue.

(Original patch by Giovanni Campagna, reverse path and tests added later
by Philip Chimento)
Comment 5 Philip Chimento 2017-04-04 05:50:09 UTC
Created attachment 349212 [details] [review]
tests: Various GValue test fixes

Consolidate the GValue tests in testEverythingBasic, and fix the name of
an enum constant in testGIMarshalling (though that test still must be
skipped.)
Comment 6 Philip Chimento 2017-04-04 05:52:44 UTC
Rebased, with a test.
Comment 7 Cosimo Cecchi 2017-04-04 16:44:18 UTC
Review of attachment 349210 [details] [review]:

Looks good to me.
Comment 8 Cosimo Cecchi 2017-04-04 16:46:01 UTC
Review of attachment 349211 [details] [review]:

Looks good.
Comment 9 Cosimo Cecchi 2017-04-04 16:47:07 UTC
Review of attachment 349212 [details] [review]:

Sure
Comment 10 Philip Chimento 2017-04-05 01:44:09 UTC
Comment on attachment 349210 [details] [review]
tests: Add marshalling tests for GValue-valued properties

Attachment 349210 [details] pushed as 32d130f - tests: Add marshalling tests for GValue-valued properties
Comment 11 Philip Chimento 2017-04-05 01:45:54 UTC
Comment on attachment 349212 [details] [review]
tests: Various GValue test fixes

Attachment 349212 [details] pushed as 50651d0 - tests: Various GValue test fixes
Comment 12 Philip Chimento 2017-04-05 01:46:44 UTC
Seems better to commit the last patch after the test is in a point release of gobject-introspection. I should probably be more conscientious about that.
Comment 13 Philip Chimento 2017-04-13 00:50:33 UTC
Attachment 349211 [details] pushed as 6bebc3a - value: Special case GValues in signals and properties