summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2011-07-05 19:29:35 +0200
committerGiovanni Campagna <gcampagna@src.gnome.org>2011-07-09 16:04:23 +0200
commitf8a4f68e3a167d43200e56cf16e057a8ab2fabf4 (patch)
tree7b02428016e9a1d63ee968f1d13a61bf446a4728
parent4f63f43e407fc050df31acf14a4b56bb2295d58b (diff)
downloadgjs-f8a4f68e3a167d43200e56cf16e057a8ab2fabf4.tar.gz
Fix converting to GByteArrays from strings or arrays
When converting an array or a string to a GByteArray (but not a JS ByteArray), it forgot to actually set the bytearray in the resulting GArgument. https://bugzilla.gnome.org/show_bug.cgi?id=652753
-rw-r--r--gi/arg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gi/arg.c b/gi/arg.c
index 0bde47e2..3390be4a 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -1418,6 +1418,8 @@ gjs_value_to_g_argument(JSContext *context,
GByteArray *byte_array = g_byte_array_sized_new(length);
g_byte_array_append(byte_array, data, length);
+ arg->v_pointer = byte_array;
+
g_free(data);
}
break;