diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-22 22:03:30 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-22 22:03:30 +0200 |
commit | 6fc1d50db34c29144344d6551c8b539d2a7340e8 (patch) | |
tree | 1027fccafd2600005b3fe5d70c73de2c7ea7e0cf /core/extension/extension_api_dump.cpp | |
parent | 60947380599b8fbba741752729db34dde151717d (diff) | |
parent | 0d13727c97fe8e2fd8425ea6bb487338dcd326a3 (diff) | |
download | redot-engine-6fc1d50db34c29144344d6551c8b539d2a7340e8.tar.gz |
Merge pull request #81521 from dsnopek/method-bind-default-argument-hash-fix
Fix method hashes with default arguments
Diffstat (limited to 'core/extension/extension_api_dump.cpp')
-rw-r--r-- | core/extension/extension_api_dump.cpp | 10 |
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; } |