summaryrefslogtreecommitdiffstats
path: root/core/variant/callable.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-09 08:34:28 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-09 08:34:28 +0100
commit31f94574d4c114e4fbdca944113601ad09a981b4 (patch)
tree2d14090dff7eac9a30aa1c3d3fb1ec470397c520 /core/variant/callable.cpp
parent9c7723b71755c3172f4b591ff8b1b3ee971f6843 (diff)
parent0e0ca01bce1adecde1de745d2b31d2ad0c12bf6b (diff)
downloadredot-engine-31f94574d4c114e4fbdca944113601ad09a981b4.tar.gz
Merge pull request #70996 from reduz/properly-report-callable-bound-arguments
Properly report Callable bound arguments
Diffstat (limited to 'core/variant/callable.cpp')
-rw-r--r--core/variant/callable.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/variant/callable.cpp b/core/variant/callable.cpp
index 60549d567e..fd85fe78f6 100644
--- a/core/variant/callable.cpp
+++ b/core/variant/callable.cpp
@@ -151,6 +151,14 @@ StringName Callable::get_method() const {
return method;
}
+int Callable::get_bound_arguments_count() const {
+ if (!is_null() && is_custom()) {
+ return custom->get_bound_arguments_count();
+ } else {
+ return 0;
+ }
+}
+
CallableCustom *Callable::get_custom() const {
ERR_FAIL_COND_V_MSG(!is_custom(), nullptr,
vformat("Can't get custom on non-CallableCustom \"%s\".", operator String()));
@@ -358,6 +366,10 @@ const Callable *CallableCustom::get_base_comparator() const {
return nullptr;
}
+int CallableCustom::get_bound_arguments_count() const {
+ return 0;
+}
+
CallableCustom::CallableCustom() {
ref_count.init();
}