diff options
| author | Chris Lord <chris@linux.intel.com> | 2010-02-16 08:44:49 +0000 |
|---|---|---|
| committer | Chris Lord <chris@linux.intel.com> | 2010-02-16 08:44:49 +0000 |
| commit | 8101b9281ddb8869954e3eb4d21522d2370156ed (patch) | |
| tree | 57836f554164192ba74dd50ad5beb8877c9a0a50 /gi/value.c | |
| parent | e556bc8f61bb5f32b95e39668e910506726de9b9 (diff) | |
| download | gjs-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.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; |
