summaryrefslogtreecommitdiffstats
path: root/core/extension/extension_api_dump.cpp
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2023-09-10 12:36:44 -0500
committerDavid Snopek <dsnopek@gmail.com>2023-09-21 12:39:04 -0500
commit0d13727c97fe8e2fd8425ea6bb487338dcd326a3 (patch)
treefe4cd6778187ddc867563abdb1564a8c3d6ada74 /core/extension/extension_api_dump.cpp
parentfc99492d3066098e938449b10e02f8e01d07e2d1 (diff)
downloadredot-engine-0d13727c97fe8e2fd8425ea6bb487338dcd326a3.tar.gz
Fix method hashes with default arguments
Diffstat (limited to 'core/extension/extension_api_dump.cpp')
-rw-r--r--core/extension/extension_api_dump.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp
index 97ead0b425..f11a4bc9a4 100644
--- a/core/extension/extension_api_dump.cpp
+++ b/core/extension/extension_api_dump.cpp
@@ -32,6 +32,7 @@
#include "core/config/engine.h"
#include "core/core_constants.h"
+#include "core/extension/gdextension_compat_hashes.h"
#include "core/io/file_access.h"
#include "core/io/json.h"
#include "core/templates/pair.h"
@@ -884,11 +885,18 @@ Dictionary GDExtensionAPIDump::generate_extension_api() {
d2["hash"] = method->get_hash();
Vector<uint32_t> compat_hashes = ClassDB::get_method_compatibility_hashes(class_name, method_name);
+ Array compatibility;
if (compat_hashes.size()) {
- Array compatibility;
for (int i = 0; i < compat_hashes.size(); i++) {
compatibility.push_back(compat_hashes[i]);
}
+ }
+
+#ifndef DISABLE_DEPRECATED
+ GDExtensionCompatHashes::get_legacy_hashes(class_name, method_name, compatibility);
+#endif
+
+ if (compatibility.size() > 0) {
d2["hash_compatibility"] = compatibility;
}