[gjs: 2/2] Merge branch 'verdre/gjs-small-invoke-c-func-improvement'
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 2/2] Merge branch 'verdre/gjs-small-invoke-c-func-improvement'
- Date: Sat, 27 Jun 2020 02:59:34 +0000 (UTC)
commit 05745ab49d4878241022a3473a6430b81e4dd816
Merge: 5923bc8d de24d1bb
Author: Philip Chimento <philip chimento gmail com>
Date: Fri Jun 26 19:58:37 2020 -0700
Merge branch 'verdre/gjs-small-invoke-c-func-improvement'
See merge request GNOME/gjs!454
gi/function.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --cc gi/function.cpp
index 19594529,15f14caa..9706e84e
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@@ -840,8 -841,11 +841,11 @@@ static bool gjs_invoke_c_function(JSCon
context, "Too many arguments to %s: expected %d, got %u",
name.get(), function->expected_js_argc, args.length()))
return false;
- } else if (!args.requireAtLeast(context, name,
- function->expected_js_argc)) {
+ } else if (args.length() < function->expected_js_argc) {
+ GjsAutoChar name = format_function_name(function);
+
- args.reportMoreArgsNeeded(context, name,
- function->expected_js_argc, args.length());
++ args.reportMoreArgsNeeded(context, name, function->expected_js_argc,
++ args.length());
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]