You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-04 19:21:46 +00:00
Fix method hashes with default arguments
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user