[gjs] Fix converting to GByteArrays from strings or arrays



commit f8a4f68e3a167d43200e56cf16e057a8ab2fabf4
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Jul 5 19:29:35 2011 +0200

    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

 gi/arg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index 0bde47e..3390be4 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]