summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gd
diff options
context:
space:
mode:
authorIgnacio Roldán Etcheverry <neikeq@users.noreply.github.com>2019-09-28 03:31:37 +0200
committerGitHub <noreply@github.com>2019-09-28 03:31:37 +0200
commit763a4d84025713c73ac826cfac185c9ff13fb274 (patch)
treec3ceb6062c00429ae07df1ce3e879d4a6757e378 /modules/mono/mono_gd
parent7a67ae01a47cc08fbd66f3c4e780118fbc07ef91 (diff)
parent1509890dbcca743cd306f55403be7a1729904652 (diff)
Merge pull request #32401 from neikeq/Kisaama!
Mono: Don't compare API hashes on release builds
Diffstat (limited to 'modules/mono/mono_gd')
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp3
-rw-r--r--modules/mono/mono_gd/gd_mono.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index b2e1deca01..544bfc4615 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -430,8 +430,8 @@ void GDMono::_register_internal_calls() {
}
void GDMono::_initialize_and_check_api_hashes() {
-
#ifdef MONO_GLUE_ENABLED
+#ifdef DEBUG_METHODS_ENABLED
if (get_api_core_hash() != GodotSharpBindings::get_core_api_hash()) {
ERR_PRINT("Mono: Core API hash mismatch.");
}
@@ -441,6 +441,7 @@ void GDMono::_initialize_and_check_api_hashes() {
ERR_PRINT("Mono: Editor API hash mismatch.");
}
#endif // TOOLS_ENABLED
+#endif // DEBUG_METHODS_ENABLED
#endif // MONO_GLUE_ENABLED
}
diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h
index 4f7d3791f7..343d68bc2d 100644
--- a/modules/mono/mono_gd/gd_mono.h
+++ b/modules/mono/mono_gd/gd_mono.h
@@ -151,6 +151,7 @@ protected:
static GDMono *singleton;
public:
+#ifdef DEBUG_METHODS_ENABLED
uint64_t get_api_core_hash() {
if (api_core_hash == 0)
api_core_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
@@ -162,7 +163,8 @@ public:
api_editor_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
return api_editor_hash;
}
-#endif
+#endif // TOOLS_ENABLED
+#endif // DEBUG_METHODS_ENABLED
#ifdef TOOLS_ENABLED
bool copy_prebuilt_api_assembly(APIAssembly::Type p_api_type, const String &p_config);