|
@@ -1,5 +1,5 @@
|
|
|
/**************************************************************************/
|
|
|
-/* gdextension_compat_hashes.cpp */
|
|
|
+/* gdextension_special_compat_hashes.cpp */
|
|
|
/**************************************************************************/
|
|
|
/* This file is part of: */
|
|
|
/* GODOT ENGINE */
|
|
@@ -28,16 +28,16 @@
|
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
|
/**************************************************************************/
|
|
|
|
|
|
-#include "gdextension_compat_hashes.h"
|
|
|
+#include "gdextension_special_compat_hashes.h"
|
|
|
|
|
|
#ifndef DISABLE_DEPRECATED
|
|
|
|
|
|
#include "core/object/class_db.h"
|
|
|
#include "core/variant/variant.h"
|
|
|
|
|
|
-HashMap<StringName, LocalVector<GDExtensionCompatHashes::Mapping>> GDExtensionCompatHashes::mappings;
|
|
|
+HashMap<StringName, LocalVector<GDExtensionSpecialCompatHashes::Mapping>> GDExtensionSpecialCompatHashes::mappings;
|
|
|
|
|
|
-bool GDExtensionCompatHashes::lookup_current_hash(const StringName &p_class, const StringName &p_method, uint32_t p_legacy_hash, uint32_t *r_current_hash) {
|
|
|
+bool GDExtensionSpecialCompatHashes::lookup_current_hash(const StringName &p_class, const StringName &p_method, uint32_t p_legacy_hash, uint32_t *r_current_hash) {
|
|
|
LocalVector<Mapping> *methods = mappings.getptr(p_class);
|
|
|
if (!methods) {
|
|
|
return false;
|
|
@@ -53,7 +53,7 @@ bool GDExtensionCompatHashes::lookup_current_hash(const StringName &p_class, con
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-bool GDExtensionCompatHashes::get_legacy_hashes(const StringName &p_class, const StringName &p_method, Array &r_hashes, bool p_check_valid) {
|
|
|
+bool GDExtensionSpecialCompatHashes::get_legacy_hashes(const StringName &p_class, const StringName &p_method, Array &r_hashes, bool p_check_valid) {
|
|
|
LocalVector<Mapping> *methods = mappings.getptr(p_class);
|
|
|
if (!methods) {
|
|
|
return false;
|
|
@@ -65,7 +65,7 @@ bool GDExtensionCompatHashes::get_legacy_hashes(const StringName &p_class, const
|
|
|
if (p_check_valid) {
|
|
|
MethodBind *mb = ClassDB::get_method_with_compatibility(p_class, p_method, mapping.current_hash);
|
|
|
if (!mb) {
|
|
|
- WARN_PRINT(vformat("Compatibility hash %d for %s::%s() mapped to non-existent hash %d. Please update gdextension_compat_hashes.cpp.", mapping.legacy_hash, p_class, p_method, mapping.current_hash));
|
|
|
+ WARN_PRINT(vformat("Compatibility hash %d for %s::%s() mapped to non-existent hash %d. Please update gdextension_special_compat_hashes.cpp.", mapping.legacy_hash, p_class, p_method, mapping.current_hash));
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
@@ -77,7 +77,7 @@ bool GDExtensionCompatHashes::get_legacy_hashes(const StringName &p_class, const
|
|
|
return found;
|
|
|
}
|
|
|
|
|
|
-void GDExtensionCompatHashes::initialize() {
|
|
|
+void GDExtensionSpecialCompatHashes::initialize() {
|
|
|
// clang-format off
|
|
|
mappings.insert("AESContext", {
|
|
|
{ "start", 3167574919, 3122411423 },
|
|
@@ -1013,7 +1013,7 @@ void GDExtensionCompatHashes::initialize() {
|
|
|
// clang-format on
|
|
|
}
|
|
|
|
|
|
-void GDExtensionCompatHashes::finalize() {
|
|
|
+void GDExtensionSpecialCompatHashes::finalize() {
|
|
|
mappings.clear();
|
|
|
}
|
|
|
|