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 708915 - Fix ParamSpec constructors
Fix ParamSpec constructors
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-27 12:04 UTC by Giovanni Campagna
Modified: 2013-09-28 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix ParamSpec constructors for boxed/object/param properties (2.33 KB, patch)
2013-09-27 12:04 UTC, Giovanni Campagna
committed Details | Review
Fix ParamSpec constructors for enum/flags (3.92 KB, patch)
2013-09-27 12:04 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-09-27 12:04:47 UTC
Especially for boxed types this is quite important
Comment 1 Giovanni Campagna 2013-09-27 12:04:50 UTC
Created attachment 255920 [details] [review]
Fix ParamSpec constructors for boxed/object/param properties

We must provide JS wrappers, and pass the actual prop_gtype to
the C constructor, instead of the fundamental type.
Comment 2 Giovanni Campagna 2013-09-27 12:04:54 UTC
Created attachment 255921 [details] [review]
Fix ParamSpec constructors for enum/flags

Remove the redundancy in the prop_gtype and actual gtype.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-09-27 16:36:53 UTC
Review of attachment 255920 [details] [review]:

::: modules/overrides/GObject.js
@@ +235,3 @@
+    this.ParamSpec.boxed = function(name, nick, blurb, flags, boxed_type) {
+	return GObject.ParamSpec._new_internal(name, boxed_type, nick, blurb, flags);
+    },

semis, not commas
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-09-27 16:38:06 UTC
Review of attachment 255921 [details] [review]:

OK.
Comment 5 Giovanni Campagna 2013-09-28 16:49:27 UTC
Pushed with suggested changes.
Attachment 255920 [details] pushed as daca80a - Fix ParamSpec constructors for boxed/object/param properties
Attachment 255921 [details] pushed as 8ee86a3 - Fix ParamSpec constructors for enum/flags