summaryrefslogtreecommitdiffstats
path: root/modules/mono/mono_gd
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2019-01-29 00:02:35 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2019-02-03 05:38:40 +0100
commitd3c51a5dfb5fb26081d64e16b198ee9ae1beb481 (patch)
treeb5729265b5ae40acb8f89e8403350db338f36bdc /modules/mono/mono_gd
parenteb1e3ee2328c05f40652021cea0db01f8e83d307 (diff)
downloadredot-engine-d3c51a5dfb5fb26081d64e16b198ee9ae1beb481.tar.gz
Mono: Cleanup
Diffstat (limited to 'modules/mono/mono_gd')
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp45
-rw-r--r--modules/mono/mono_gd/gd_mono.h22
-rw-r--r--modules/mono/mono_gd/gd_mono_class_member.h4
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp14
-rw-r--r--modules/mono/mono_gd/gd_mono_field.h14
-rw-r--r--modules/mono/mono_gd/gd_mono_header.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_log.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h7
-rw-r--r--modules/mono/mono_gd/gd_mono_method.cpp14
-rw-r--r--modules/mono/mono_gd/gd_mono_method.h16
-rw-r--r--modules/mono/mono_gd/gd_mono_property.cpp14
-rw-r--r--modules/mono/mono_gd/gd_mono_property.h14
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.cpp8
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.h4
16 files changed, 75 insertions, 111 deletions
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index 900caefe1c..16ab5f05f6 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -54,17 +54,6 @@
#include "main/main.h"
#endif
-#ifdef MONO_PRINT_HANDLER_ENABLED
-void gdmono_MonoPrintCallback(const char *string, mono_bool is_stdout) {
-
- if (is_stdout) {
- OS::get_singleton()->print(string);
- } else {
- OS::get_singleton()->printerr(string);
- }
-}
-#endif
-
GDMono *GDMono::singleton = NULL;
namespace {
@@ -162,11 +151,6 @@ void GDMono::initialize() {
GDMonoLog::get_singleton()->initialize();
-#ifdef MONO_PRINT_HANDLER_ENABLED
- mono_trace_set_print_handler(gdmono_MonoPrintCallback);
- mono_trace_set_printerr_handler(gdmono_MonoPrintCallback);
-#endif
-
String assembly_rootdir;
String config_dir;
@@ -327,7 +311,7 @@ namespace GodotSharpBindings {
uint64_t get_core_api_hash();
#ifdef TOOLS_ENABLED
uint64_t get_editor_api_hash();
-#endif // TOOLS_ENABLED
+#endif
uint32_t get_bindings_version();
void register_generated_icalls();
@@ -344,29 +328,20 @@ void GDMono::_register_internal_calls() {
#endif
}
-#ifdef DEBUG_METHODS_ENABLED
void GDMono::_initialize_and_check_api_hashes() {
- api_core_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
-
#ifdef MONO_GLUE_ENABLED
- if (api_core_hash != GodotSharpBindings::get_core_api_hash()) {
+ if (get_api_core_hash() != GodotSharpBindings::get_core_api_hash()) {
ERR_PRINT("Mono: Core API hash mismatch!");
}
-#endif
#ifdef TOOLS_ENABLED
- api_editor_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
-
-#ifdef MONO_GLUE_ENABLED
- if (api_editor_hash != GodotSharpBindings::get_editor_api_hash()) {
+ if (get_api_editor_hash() != GodotSharpBindings::get_editor_api_hash()) {
ERR_PRINT("Mono: Editor API hash mismatch!");
}
-#endif
-
#endif // TOOLS_ENABLED
+#endif // MONO_GLUE_ENABLED
}
-#endif // DEBUG_METHODS_ENABLED
void GDMono::add_assembly(uint32_t p_domain_id, GDMonoAssembly *p_assembly) {
@@ -915,7 +890,7 @@ void GDMono::unhandled_exception_hook(MonoObject *p_exc, void *) {
ScriptDebugger::get_singleton()->idle_poll();
#endif
abort();
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
GDMono::GDMono() {
@@ -946,12 +921,10 @@ GDMono::GDMono() {
editor_tools_assembly = NULL;
#endif
-#ifdef DEBUG_METHODS_ENABLED
api_core_hash = 0;
#ifdef TOOLS_ENABLED
api_editor_hash = 0;
#endif
-#endif
}
GDMono::~GDMono() {
@@ -1074,17 +1047,9 @@ void _GodotSharp::_bind_methods() {
_GodotSharp::_GodotSharp() {
singleton = this;
- queue_empty = true;
-#ifndef NO_THREADS
- queue_mutex = Mutex::create();
-#endif
}
_GodotSharp::~_GodotSharp() {
singleton = NULL;
-
- if (queue_mutex) {
- memdelete(queue_mutex);
- }
}
diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h
index 13de3061b3..06904cfb34 100644
--- a/modules/mono/mono_gd/gd_mono.h
+++ b/modules/mono/mono_gd/gd_mono.h
@@ -134,13 +134,11 @@ class GDMono {
Error _load_tools_domain();
#endif
-#ifdef DEBUG_METHODS_ENABLED
uint64_t api_core_hash;
#ifdef TOOLS_ENABLED
uint64_t api_editor_hash;
#endif
void _initialize_and_check_api_hashes();
-#endif
GDMonoLog *gdmono_log;
@@ -152,11 +150,17 @@ protected:
static GDMono *singleton;
public:
-#ifdef DEBUG_METHODS_ENABLED
- uint64_t get_api_core_hash() { return api_core_hash; }
+ uint64_t get_api_core_hash() {
+ if (api_core_hash == 0)
+ api_core_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
+ return api_core_hash;
+ }
#ifdef TOOLS_ENABLED
- uint64_t get_api_editor_hash() { return api_editor_hash; }
-#endif
+ uint64_t get_api_editor_hash() {
+ if (api_editor_hash == 0)
+ api_editor_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
+ return api_editor_hash;
+ }
#endif
#ifdef TOOLS_ENABLED
@@ -268,12 +272,6 @@ class _GodotSharp : public Object {
List<NodePath *> np_delete_queue;
List<RID *> rid_delete_queue;
- bool queue_empty;
-
-#ifndef NO_THREADS
- Mutex *queue_mutex;
-#endif
-
protected:
static _GodotSharp *singleton;
static void _bind_methods();
diff --git a/modules/mono/mono_gd/gd_mono_class_member.h b/modules/mono/mono_gd/gd_mono_class_member.h
index 5bd21178ba..3058b18c05 100644
--- a/modules/mono/mono_gd/gd_mono_class_member.h
+++ b/modules/mono/mono_gd/gd_mono_class_member.h
@@ -35,7 +35,7 @@
#include <mono/metadata/object.h>
-class GDMonoClassMember {
+class IMonoClassMember {
public:
enum Visibility {
PRIVATE,
@@ -51,7 +51,7 @@ public:
MEMBER_TYPE_METHOD
};
- virtual ~GDMonoClassMember() {}
+ virtual ~IMonoClassMember() {}
virtual MemberType get_member_type() = 0;
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index a9d993412e..48fa380456 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -505,20 +505,20 @@ bool GDMonoField::is_static() {
return mono_field_get_flags(mono_field) & MONO_FIELD_ATTR_STATIC;
}
-GDMonoClassMember::Visibility GDMonoField::get_visibility() {
+IMonoClassMember::Visibility GDMonoField::get_visibility() {
switch (mono_field_get_flags(mono_field) & MONO_FIELD_ATTR_FIELD_ACCESS_MASK) {
case MONO_FIELD_ATTR_PRIVATE:
- return GDMonoClassMember::PRIVATE;
+ return IMonoClassMember::PRIVATE;
case MONO_FIELD_ATTR_FAM_AND_ASSEM:
- return GDMonoClassMember::PROTECTED_AND_INTERNAL;
+ return IMonoClassMember::PROTECTED_AND_INTERNAL;
case MONO_FIELD_ATTR_ASSEMBLY:
- return GDMonoClassMember::INTERNAL;
+ return IMonoClassMember::INTERNAL;
case MONO_FIELD_ATTR_FAMILY:
- return GDMonoClassMember::PROTECTED;
+ return IMonoClassMember::PROTECTED;
case MONO_FIELD_ATTR_PUBLIC:
- return GDMonoClassMember::PUBLIC;
+ return IMonoClassMember::PUBLIC;
default:
- ERR_FAIL_V(GDMonoClassMember::PRIVATE);
+ ERR_FAIL_V(IMonoClassMember::PRIVATE);
}
}
diff --git a/modules/mono/mono_gd/gd_mono_field.h b/modules/mono/mono_gd/gd_mono_field.h
index 319e895ab9..a3244101d8 100644
--- a/modules/mono/mono_gd/gd_mono_field.h
+++ b/modules/mono/mono_gd/gd_mono_field.h
@@ -35,7 +35,7 @@
#include "gd_mono_class_member.h"
#include "gd_mono_header.h"
-class GDMonoField : public GDMonoClassMember {
+class GDMonoField : public IMonoClassMember {
GDMonoClass *owner;
MonoClassField *mono_field;
@@ -47,15 +47,15 @@ class GDMonoField : public GDMonoClassMember {
MonoCustomAttrInfo *attributes;
public:
- virtual MemberType get_member_type() { return MEMBER_TYPE_FIELD; }
+ virtual MemberType get_member_type() GD_FINAL { return MEMBER_TYPE_FIELD; }
- virtual StringName get_name() { return name; }
+ virtual StringName get_name() GD_FINAL { return name; }
- virtual bool is_static();
- virtual Visibility get_visibility();
+ virtual bool is_static() GD_FINAL;
+ virtual Visibility get_visibility() GD_FINAL;
- virtual bool has_attribute(GDMonoClass *p_attr_class);
- virtual MonoObject *get_attribute(GDMonoClass *p_attr_class);
+ virtual bool has_attribute(GDMonoClass *p_attr_class) GD_FINAL;
+ virtual MonoObject *get_attribute(GDMonoClass *p_attr_class) GD_FINAL;
void fetch_attributes();
_FORCE_INLINE_ ManagedType get_type() const { return type; }
diff --git a/modules/mono/mono_gd/gd_mono_header.h b/modules/mono/mono_gd/gd_mono_header.h
index 23306d11b9..dd8c047386 100644
--- a/modules/mono/mono_gd/gd_mono_header.h
+++ b/modules/mono/mono_gd/gd_mono_header.h
@@ -35,7 +35,7 @@
class GDMonoAssembly;
class GDMonoClass;
-class GDMonoClassMember;
+class IMonoClassMember;
class GDMonoField;
class GDMonoProperty;
class GDMonoMethod;
diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp
index 0574b0025d..0daa394e63 100644
--- a/modules/mono/mono_gd/gd_mono_internals.cpp
+++ b/modules/mono/mono_gd/gd_mono_internals.cpp
@@ -72,7 +72,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
void unhandled_exception(MonoException *p_exc) {
mono_unhandled_exception((MonoObject *)p_exc); // prints the exception as well
abort();
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
} // namespace GDMonoInternals
diff --git a/modules/mono/mono_gd/gd_mono_internals.h b/modules/mono/mono_gd/gd_mono_internals.h
index 09cb59ee6b..2d77bde27c 100644
--- a/modules/mono/mono_gd/gd_mono_internals.h
+++ b/modules/mono/mono_gd/gd_mono_internals.h
@@ -45,7 +45,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged);
* Do not call this function directly.
* Use GDMonoUtils::debug_unhandled_exception(MonoException *) instead.
*/
-_NO_RETURN_ void unhandled_exception(MonoException *p_exc);
+GD_NORETURN void unhandled_exception(MonoException *p_exc);
} // namespace GDMonoInternals
diff --git a/modules/mono/mono_gd/gd_mono_log.cpp b/modules/mono/mono_gd/gd_mono_log.cpp
index fa4850ca8c..ec89df1959 100644
--- a/modules/mono/mono_gd/gd_mono_log.cpp
+++ b/modules/mono/mono_gd/gd_mono_log.cpp
@@ -52,7 +52,7 @@ static int log_level_get_id(const char *p_log_level) {
return -1;
}
-void gdmono_MonoLogCallback(const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data) {
+static void mono_log_callback(const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data) {
FileAccess *f = GDMonoLog::get_singleton()->get_log_file();
@@ -153,7 +153,7 @@ void GDMonoLog::initialize() {
if (log_file) {
print_verbose("Mono: Logfile is " + log_file_path);
- mono_trace_set_log_handler(gdmono_MonoLogCallback, this);
+ mono_trace_set_log_handler(mono_log_callback, this);
} else {
OS::get_singleton()->printerr("Mono: No log file, using default log handler\n");
}
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index 5e2deea43c..4f86e02f87 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -206,9 +206,10 @@ enum {
// In the future we may force this if we want to ref return these structs
#ifdef GD_MONO_FORCE_INTEROP_STRUCT_COPY
-// Sometimes clang-format can be an ass
-GD_STATIC_ASSERT(MATCHES_Vector2 &&MATCHES_Rect2 &&MATCHES_Transform2D &&MATCHES_Vector3 &&
- MATCHES_Basis &&MATCHES_Quat &&MATCHES_Transform &&MATCHES_AABB &&MATCHES_Color &&MATCHES_Plane);
+/* clang-format off */
+GD_STATIC_ASSERT(MATCHES_Vector2 && MATCHES_Rect2 && MATCHES_Transform2D && MATCHES_Vector3 &&
+ MATCHES_Basis && MATCHES_Quat && MATCHES_Transform && MATCHES_AABB && MATCHES_Color &&MATCHES_Plane);
+/* clang-format on */
#endif
} // namespace InteropLayout
diff --git a/modules/mono/mono_gd/gd_mono_method.cpp b/modules/mono/mono_gd/gd_mono_method.cpp
index 071d852ce7..7f11e4671d 100644
--- a/modules/mono/mono_gd/gd_mono_method.cpp
+++ b/modules/mono/mono_gd/gd_mono_method.cpp
@@ -78,20 +78,20 @@ bool GDMonoMethod::is_static() {
return mono_method_get_flags(mono_method, NULL) & MONO_METHOD_ATTR_STATIC;
}
-GDMonoClassMember::Visibility GDMonoMethod::get_visibility() {
+IMonoClassMember::Visibility GDMonoMethod::get_visibility() {
switch (mono_method_get_flags(mono_method, NULL) & MONO_METHOD_ATTR_ACCESS_MASK) {
case MONO_METHOD_ATTR_PRIVATE:
- return GDMonoClassMember::PRIVATE;
+ return IMonoClassMember::PRIVATE;
case MONO_METHOD_ATTR_FAM_AND_ASSEM:
- return GDMonoClassMember::PROTECTED_AND_INTERNAL;
+ return IMonoClassMember::PROTECTED_AND_INTERNAL;
case MONO_METHOD_ATTR_ASSEM:
- return GDMonoClassMember::INTERNAL;
+ return IMonoClassMember::INTERNAL;
case MONO_METHOD_ATTR_FAMILY:
- return GDMonoClassMember::PROTECTED;
+ return IMonoClassMember::PROTECTED;
case MONO_METHOD_ATTR_PUBLIC:
- return GDMonoClassMember::PUBLIC;
+ return IMonoClassMember::PUBLIC;
default:
- ERR_FAIL_V(GDMonoClassMember::PRIVATE);
+ ERR_FAIL_V(IMonoClassMember::PRIVATE);
}
}
diff --git a/modules/mono/mono_gd/gd_mono_method.h b/modules/mono/mono_gd/gd_mono_method.h
index c4a994177e..fc035d387c 100644
--- a/modules/mono/mono_gd/gd_mono_method.h
+++ b/modules/mono/mono_gd/gd_mono_method.h
@@ -35,7 +35,7 @@
#include "gd_mono_class_member.h"
#include "gd_mono_header.h"
-class GDMonoMethod : public GDMonoClassMember {
+class GDMonoMethod : public IMonoClassMember {
StringName name;
@@ -57,17 +57,17 @@ class GDMonoMethod : public GDMonoClassMember {
MonoMethod *mono_method;
public:
- virtual MemberType get_member_type() { return MEMBER_TYPE_METHOD; }
+ virtual MemberType get_member_type() GD_FINAL { return MEMBER_TYPE_METHOD; }
- virtual StringName get_name() { return name; }
+ virtual StringName get_name() GD_FINAL { return name; }
- virtual bool is_static();
+ virtual bool is_static() GD_FINAL;
- virtual Visibility get_visibility();
+ virtual Visibility get_visibility() GD_FINAL;
- virtual bool has_attribute(GDMonoClass *p_attr_class);
- virtual MonoObject *get_attribute(GDMonoClass *p_attr_class);
- virtual void fetch_attributes();
+ virtual bool has_attribute(GDMonoClass *p_attr_class) GD_FINAL;
+ virtual MonoObject *get_attribute(GDMonoClass *p_attr_class) GD_FINAL;
+ void fetch_attributes();
_FORCE_INLINE_ int get_parameters_count() { return params_count; }
_FORCE_INLINE_ ManagedType get_return_type() { return return_type; }
diff --git a/modules/mono/mono_gd/gd_mono_property.cpp b/modules/mono/mono_gd/gd_mono_property.cpp
index 04fd8b8e63..5842e26241 100644
--- a/modules/mono/mono_gd/gd_mono_property.cpp
+++ b/modules/mono/mono_gd/gd_mono_property.cpp
@@ -80,24 +80,24 @@ bool GDMonoProperty::is_static() {
return mono_method_get_flags(prop_method, NULL) & MONO_METHOD_ATTR_STATIC;
}
-GDMonoClassMember::Visibility GDMonoProperty::get_visibility() {
+IMonoClassMember::Visibility GDMonoProperty::get_visibility() {
MonoMethod *prop_method = mono_property_get_get_method(mono_property);
if (prop_method == NULL)
prop_method = mono_property_get_set_method(mono_property);
switch (mono_method_get_flags(prop_method, NULL) & MONO_METHOD_ATTR_ACCESS_MASK) {
case MONO_METHOD_ATTR_PRIVATE:
- return GDMonoClassMember::PRIVATE;
+ return IMonoClassMember::PRIVATE;
case MONO_METHOD_ATTR_FAM_AND_ASSEM:
- return GDMonoClassMember::PROTECTED_AND_INTERNAL;
+ return IMonoClassMember::PROTECTED_AND_INTERNAL;
case MONO_METHOD_ATTR_ASSEM:
- return GDMonoClassMember::INTERNAL;
+ return IMonoClassMember::INTERNAL;
case MONO_METHOD_ATTR_FAMILY:
- return GDMonoClassMember::PROTECTED;
+ return IMonoClassMember::PROTECTED;
case MONO_METHOD_ATTR_PUBLIC:
- return GDMonoClassMember::PUBLIC;
+ return IMonoClassMember::PUBLIC;
default:
- ERR_FAIL_V(GDMonoClassMember::PRIVATE);
+ ERR_FAIL_V(IMonoClassMember::PRIVATE);
}
}
diff --git a/modules/mono/mono_gd/gd_mono_property.h b/modules/mono/mono_gd/gd_mono_property.h
index 934ce68904..d8a9f69ffb 100644
--- a/modules/mono/mono_gd/gd_mono_property.h
+++ b/modules/mono/mono_gd/gd_mono_property.h
@@ -35,7 +35,7 @@
#include "gd_mono_class_member.h"
#include "gd_mono_header.h"
-class GDMonoProperty : public GDMonoClassMember {
+class GDMonoProperty : public IMonoClassMember {
GDMonoClass *owner;
MonoProperty *mono_property;
@@ -47,15 +47,15 @@ class GDMonoProperty : public GDMonoClassMember {
MonoCustomAttrInfo *attributes;
public:
- virtual MemberType get_member_type() { return MEMBER_TYPE_PROPERTY; }
+ virtual MemberType get_member_type() GD_FINAL { return MEMBER_TYPE_PROPERTY; }
- virtual StringName get_name() { return name; }
+ virtual StringName get_name() GD_FINAL { return name; }
- virtual bool is_static();
- virtual Visibility get_visibility();
+ virtual bool is_static() GD_FINAL;
+ virtual Visibility get_visibility() GD_FINAL;
- virtual bool has_attribute(GDMonoClass *p_attr_class);
- virtual MonoObject *get_attribute(GDMonoClass *p_attr_class);
+ virtual bool has_attribute(GDMonoClass *p_attr_class) GD_FINAL;
+ virtual MonoObject *get_attribute(GDMonoClass *p_attr_class) GD_FINAL;
void fetch_attributes();
bool has_getter();
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp
index 97a00a504d..804bec811e 100644
--- a/modules/mono/mono_gd/gd_mono_utils.cpp
+++ b/modules/mono/mono_gd/gd_mono_utils.cpp
@@ -565,7 +565,7 @@ void debug_send_unhandled_exception_error(MonoException *p_exc) {
if (unexpected_exc) {
GDMonoInternals::unhandled_exception(unexpected_exc);
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
Vector<ScriptLanguage::StackInfo> _si;
@@ -604,7 +604,7 @@ void debug_unhandled_exception(MonoException *p_exc) {
ScriptDebugger::get_singleton()->idle_poll();
#endif
GDMonoInternals::unhandled_exception(p_exc); // prints the exception as well
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
void print_unhandled_exception(MonoException *p_exc) {
@@ -615,7 +615,7 @@ void set_pending_exception(MonoException *p_exc) {
#ifdef HAS_PENDING_EXCEPTIONS
if (get_runtime_invoke_count() == 0) {
debug_unhandled_exception(p_exc);
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
if (!mono_runtime_set_pending_exception(p_exc, false)) {
@@ -624,7 +624,7 @@ void set_pending_exception(MonoException *p_exc) {
}
#else
debug_unhandled_exception(p_exc);
- _UNREACHABLE_();
+ GD_UNREACHABLE();
#endif
}
diff --git a/modules/mono/mono_gd/gd_mono_utils.h b/modules/mono/mono_gd/gd_mono_utils.h
index 6febc50a5f..e88bf1ced9 100644
--- a/modules/mono/mono_gd/gd_mono_utils.h
+++ b/modules/mono/mono_gd/gd_mono_utils.h
@@ -44,7 +44,7 @@
#define UNLIKELY_UNHANDLED_EXCEPTION(m_exc) \
if (unlikely(m_exc != NULL)) { \
GDMonoUtils::debug_unhandled_exception(m_exc); \
- _UNREACHABLE_(); \
+ GD_UNREACHABLE(); \
}
namespace GDMonoUtils {
@@ -214,7 +214,7 @@ void set_exception_message(MonoException *p_exc, String message);
void debug_print_unhandled_exception(MonoException *p_exc);
void debug_send_unhandled_exception_error(MonoException *p_exc);
-_NO_RETURN_ void debug_unhandled_exception(MonoException *p_exc);
+GD_NORETURN void debug_unhandled_exception(MonoException *p_exc);
void print_unhandled_exception(MonoException *p_exc);
/**