Fix method hashes with default arguments
This commit is contained in:
parent
fc99492d30
commit
0d13727c97
7 changed files with 937 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue