[gjs] GLib: Don't pass extra arguments to constructors



commit ce0a129c80f13d14d26e4cd2dcf2fd6cd0929405
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jul 18 20:24:27 2012 -0400

    GLib: Don't pass extra arguments to constructors
    
    https://bugzilla.gnome.org/show_bug.cgi?id=680215

 modules/overrides/GLib.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/modules/overrides/GLib.js b/modules/overrides/GLib.js
index 8d0eed0..7d69b76 100644
--- a/modules/overrides/GLib.js
+++ b/modules/overrides/GLib.js
@@ -110,7 +110,7 @@ function _pack_variant(signature, value) {
 	let arrayType = _read_single_type(signature, false);
 	if (arrayType[0] == 's') {
 	    // special case for array of strings
-	    return GLib.Variant.new_strv(value, value.length);
+	    return GLib.Variant.new_strv(value);
 	}
 	if (arrayType[0] == 'y') {
 	    // special case for array of bytes
@@ -118,7 +118,7 @@ function _pack_variant(signature, value) {
 	}
 	if (arrayType[0] == 'a' && arrayType[1] == 'y') {
 	    // special case for array of array of bytes
-	    return GLib.Variant.new_bytestring_array(value, value.length);
+	    return GLib.Variant.new_bytestring_array(value);
 	}
 
 	let arrayValue = [];
@@ -136,7 +136,7 @@ function _pack_variant(signature, value) {
 		arrayValue.push(child);
 	    }
 	}
-	return GLib.Variant.new_array(GLib.VariantType.new(arrayType.join('')), arrayValue, arrayValue.length);
+	return GLib.Variant.new_array(GLib.VariantType.new(arrayType.join('')), arrayValue);
     case '(':
 	let children = [ ];
 	for (let i = 0; i < value.length; i++) {
@@ -149,7 +149,7 @@ function _pack_variant(signature, value) {
 	if (signature[0] != ')')
 	    throw new TypeError('Invalid GVariant signature for type TUPLE (expected ")")');
 	signature.shift();
-	return GLib.Variant.new_tuple(children, children.length);
+	return GLib.Variant.new_tuple(children);
     case '{':
 	let key = _pack_variant(signature, value[0]);
 	let child = _pack_variant(signature, value[1]);



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