[gjs: 2/5] Handle GValues of type G_TYPE_STRV
- From: Danielle Madeley <daniellem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 2/5] Handle GValues of type G_TYPE_STRV
- Date: Tue, 22 Jun 2010 04:44:30 +0000 (UTC)
commit efeef9427ae3e01de4473ad20dcf4e098aea8749
Author: Danielle Madeley <danielle madeley collabora co uk>
Date: Fri Jun 18 15:42:07 2010 +1000
Handle GValues of type G_TYPE_STRV
gi/value.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gi/value.c b/gi/value.c
index 49df3dc..c5454db 100644
--- a/gi/value.c
+++ b/gi/value.c
@@ -566,6 +566,13 @@ gjs_value_from_g_value_internal(JSContext *context,
obj = gjs_object_from_g_object(context, gobj);
*value_p = OBJECT_TO_JSVAL(obj);
+ } else if (gtype == G_TYPE_STRV) {
+ if (!gjs_array_from_strv (context,
+ value_p,
+ g_value_get_boxed (gvalue))) {
+ gjs_throw(context, "Failed to convert strv to array");
+ return JS_FALSE;
+ }
} else if (g_type_is_a(gtype, G_TYPE_BOXED)) {
GjsBoxedCreationFlags boxed_flags;
GIBaseInfo *info;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]