[gjs] [arg] Add JSRoot to gjs_array_from_strv()
- From: Danielle Madeley <daniellem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] [arg] Add JSRoot to gjs_array_from_strv()
- Date: Tue, 22 Jun 2010 13:05:46 +0000 (UTC)
commit 48b3c55b09f0eee0ebf5e2a09f668568c68fa3bf
Author: Danielle Madeley <danielle madeley collabora co uk>
Date: Tue Jun 22 17:32:23 2010 +1000
[arg] Add JSRoot to gjs_array_from_strv()
gi/arg.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index 08d6cf9..e727819 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -388,6 +388,9 @@ gjs_array_from_strv(JSContext *context,
*value_p = OBJECT_TO_JSVAL(obj);
+ elem = JSVAL_VOID;
+ JS_AddRoot(context, &elem);
+
for (i = 0; strv[i] != NULL; i++) {
if (!gjs_string_from_utf8 (context, strv[i], -1, &elem))
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]