summaryrefslogtreecommitdiff
path: root/gi/value.c
diff options
context:
space:
mode:
authorChris Lord <chris@linux.intel.com>2010-02-16 08:44:49 +0000
committerChris Lord <chris@linux.intel.com>2010-02-16 08:44:49 +0000
commit8101b9281ddb8869954e3eb4d21522d2370156ed (patch)
tree57836f554164192ba74dd50ad5beb8877c9a0a50 /gi/value.c
parente556bc8f61bb5f32b95e39668e910506726de9b9 (diff)
downloadgjs-generalised-array-args.tar.gz
Generalise array input argumentsgeneralised-array-args
Patch by Johan Dahlin <johan@gnome.org> Generalise array input arguments instead of special casing particular array types. Based on a patch by Johan, updated to apply against trunk and work with arrays of GValue.
Diffstat (limited to 'gi/value.c')
-rw-r--r--gi/value.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gi/value.c b/gi/value.c
index ab80ac97..d014e5b8 100644
--- a/gi/value.c
+++ b/gi/value.c
@@ -355,9 +355,13 @@ gjs_value_to_g_value_internal(JSContext *context,
void *result;
char **strv;
- if (!gjs_array_to_strv (context,
- value,
- length, &result))
+ if (!gjs_array_to_array (context,
+ value,
+ length,
+ GI_TYPE_TAG_UTF8,
+ NULL,
+ TRUE,
+ (void **)&strv))
return JS_FALSE;
/* cast to strv in a separate step to avoid type-punning */
strv = result;