[gjs] arg: Wrap GParamSpec values when sending them to JS
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] arg: Wrap GParamSpec values when sending them to JS
- Date: Thu, 15 Dec 2011 22:17:58 +0000 (UTC)
commit c90eceff388c8748df5b513a449d1f692d85b064
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Nov 30 15:46:15 2011 -0500
arg: Wrap GParamSpec values when sending them to JS
We need to do this, otherwise a property handler can't get its own pspec.
https://bugzilla.gnome.org/show_bug.cgi?id=665432
gi/arg.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index 33513a5..631c416 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -28,6 +28,7 @@
#include "foreign.h"
#include "boxed.h"
#include "union.h"
+#include "param.h"
#include "value.h"
#include "gjs/byteArray.h"
#include <gjs/gjs-module.h>
@@ -2291,6 +2292,11 @@ gjs_value_from_g_argument (JSContext *context,
g_type_name(gtype),
interface_type);
return JS_FALSE;
+ } else if (g_type_is_a(gtype, G_TYPE_PARAM)) {
+ JSObject *obj;
+ obj = gjs_param_from_g_param(context, G_PARAM_SPEC(arg->v_pointer));
+ if (obj)
+ value = OBJECT_TO_JSVAL(obj);
} else if (gtype == G_TYPE_NONE) {
gjs_throw(context, "Unexpected unregistered type packing GArgument into jsval");
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]