[gjs] gi: Do not increment argument counter for OUT arguments



commit e44e9711e0d25ab1da55c25d81c7151aaac0629c
Author: Johan Bilien <jobi litl com>
Date:   Mon Mar 1 16:59:57 2010 -0500

    gi: Do not increment argument counter for OUT arguments
    
    OUT arguments are not passed in JS, so do not increment the index in the
    argv array when dealing with an OUT argument.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=611529

 gi/function.c                  |    3 ++-
 test/js/testEverythingBasic.js |    2 --
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gi/function.c b/gi/function.c
index c82be8a..a25a21c 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -625,9 +625,10 @@ gjs_invoke_c_function(JSContext      *context,
                 out_args_pos++;
                 inout_args_pos++;
             }
+
+            ++argv_pos;
         }
 
-        ++argv_pos;
         ++in_args_pos;
         processed_in_args = in_args_pos;
 
diff --git a/test/js/testEverythingBasic.js b/test/js/testEverythingBasic.js
index f1e67fb..4266920 100644
--- a/test/js/testEverythingBasic.js
+++ b/test/js/testEverythingBasic.js
@@ -141,14 +141,12 @@ function testStrv() {
     assertEquals("3", strv[2]);
 }
 
-/* Failing, see https://bugzilla.gnome.org/show_bug.cgi?id=611529
 function testInAfterOut() {
     const str = "hello";
 
     let len = Everything.test_int_out_utf8(str);
     assertEquals("testInAfterOut", str.length, len);
 }
-*/
 
 function testUtf8() {
     const CONST_STR = "const \u2665 utf8";



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