summaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-01-30 13:33:03 +0100
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-03-14 10:27:39 +0100
commitfb79d5ff9883af005c7aeae9994c463223a48c8c (patch)
tree6087ee88d52d1509cff7118ef6f81238d75e5353 /test/src
parente6b6df5893c7d9ead150f9f058b36c6352a152a9 (diff)
downloadredot-cpp-fb79d5ff9883af005c7aeae9994c463223a48c8c.tar.gz
Add support for getting argument count from `Callable`s
Diffstat (limited to 'test/src')
-rw-r--r--test/src/example.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp
index e51672f..3ec8bca 100644
--- a/test/src/example.cpp
+++ b/test/src/example.cpp
@@ -49,6 +49,11 @@ public:
return ObjectID();
}
+ virtual int get_argument_count(bool &r_is_valid) const {
+ r_is_valid = true;
+ return 2;
+ }
+
virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, GDExtensionCallError &r_call_error) const {
r_return_value = "Hi";
r_call_error.error = GDEXTENSION_CALL_OK;