summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gd
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/mono_gd')
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp10
-rw-r--r--modules/mono/mono_gd/gd_mono_android.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_cache.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono_cache.h6
-rw-r--r--modules/mono/mono_gd/gd_mono_class.cpp8
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp44
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_log.cpp6
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp142
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h42
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.cpp4
11 files changed, 132 insertions, 138 deletions
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index 60008f8fab..895393537f 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -621,7 +621,7 @@ bool GDMono::copy_prebuilt_api_assembly(ApiAssemblyInfo::Type p_api_type, const
memdelete(da);
if (err != OK) {
- ERR_PRINTS("Failed to create destination directory for the API assemblies. Error: " + itos(err) + ".");
+ ERR_PRINT("Failed to create destination directory for the API assemblies. Error: " + itos(err) + ".");
return false;
}
}
@@ -630,15 +630,15 @@ bool GDMono::copy_prebuilt_api_assembly(ApiAssemblyInfo::Type p_api_type, const
String xml_file = assembly_name + ".xml";
if (da->copy(src_dir.plus_file(xml_file), dst_dir.plus_file(xml_file)) != OK)
- WARN_PRINTS("Failed to copy '" + xml_file + "'.");
+ WARN_PRINT("Failed to copy '" + xml_file + "'.");
String pdb_file = assembly_name + ".pdb";
if (da->copy(src_dir.plus_file(pdb_file), dst_dir.plus_file(pdb_file)) != OK)
- WARN_PRINTS("Failed to copy '" + pdb_file + "'.");
+ WARN_PRINT("Failed to copy '" + pdb_file + "'.");
String assembly_file = assembly_name + ".dll";
if (da->copy(src_dir.plus_file(assembly_file), dst_dir.plus_file(assembly_file)) != OK) {
- ERR_PRINTS("Failed to copy '" + assembly_file + "'.");
+ ERR_PRINT("Failed to copy '" + assembly_file + "'.");
return false;
}
@@ -1115,7 +1115,7 @@ Error GDMono::finalize_and_unload_domain(MonoDomain *p_domain) {
mono_domain_try_unload(p_domain, (MonoObject **)&exc);
if (exc) {
- ERR_PRINTS("Exception thrown when unloading domain '" + domain_name + "'.");
+ ERR_PRINT("Exception thrown when unloading domain '" + domain_name + "'.");
GDMonoUtils::debug_print_unhandled_exception(exc);
return FAILED;
}
diff --git a/modules/mono/mono_gd/gd_mono_android.cpp b/modules/mono/mono_gd/gd_mono_android.cpp
index 27f394fae0..761368878f 100644
--- a/modules/mono/mono_gd/gd_mono_android.cpp
+++ b/modules/mono/mono_gd/gd_mono_android.cpp
@@ -315,7 +315,7 @@ MonoArray *_gd_mono_android_cert_store_lookup(MonoString *p_alias) {
char *alias_utf8 = mono_string_to_utf8_checked(p_alias, &mono_error);
if (!mono_error_ok(&mono_error)) {
- ERR_PRINTS(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&mono_error) + "'.");
+ ERR_PRINT(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&mono_error) + "'.");
mono_error_cleanup(&mono_error);
return NULL;
}
diff --git a/modules/mono/mono_gd/gd_mono_cache.cpp b/modules/mono/mono_gd/gd_mono_cache.cpp
index f1f6524cd2..0ad90a510e 100644
--- a/modules/mono/mono_gd/gd_mono_cache.cpp
+++ b/modules/mono/mono_gd/gd_mono_cache.cpp
@@ -136,10 +136,8 @@ void CachedData::clear_godot_api_cache() {
class_SignalAttribute = NULL;
class_ToolAttribute = NULL;
class_RemoteAttribute = NULL;
- class_SyncAttribute = NULL;
class_MasterAttribute = NULL;
class_PuppetAttribute = NULL;
- class_SlaveAttribute = NULL;
class_RemoteSyncAttribute = NULL;
class_MasterSyncAttribute = NULL;
class_PuppetSyncAttribute = NULL;
@@ -254,10 +252,8 @@ void update_godot_api_cache() {
CACHE_CLASS_AND_CHECK(SignalAttribute, GODOT_API_CLASS(SignalAttribute));
CACHE_CLASS_AND_CHECK(ToolAttribute, GODOT_API_CLASS(ToolAttribute));
CACHE_CLASS_AND_CHECK(RemoteAttribute, GODOT_API_CLASS(RemoteAttribute));
- CACHE_CLASS_AND_CHECK(SyncAttribute, GODOT_API_CLASS(SyncAttribute));
CACHE_CLASS_AND_CHECK(MasterAttribute, GODOT_API_CLASS(MasterAttribute));
CACHE_CLASS_AND_CHECK(PuppetAttribute, GODOT_API_CLASS(PuppetAttribute));
- CACHE_CLASS_AND_CHECK(SlaveAttribute, GODOT_API_CLASS(SlaveAttribute));
CACHE_CLASS_AND_CHECK(RemoteSyncAttribute, GODOT_API_CLASS(RemoteSyncAttribute));
CACHE_CLASS_AND_CHECK(MasterSyncAttribute, GODOT_API_CLASS(MasterSyncAttribute));
CACHE_CLASS_AND_CHECK(PuppetSyncAttribute, GODOT_API_CLASS(PuppetSyncAttribute));
diff --git a/modules/mono/mono_gd/gd_mono_cache.h b/modules/mono/mono_gd/gd_mono_cache.h
index 1dc6b70479..0458e91240 100644
--- a/modules/mono/mono_gd/gd_mono_cache.h
+++ b/modules/mono/mono_gd/gd_mono_cache.h
@@ -106,13 +106,11 @@ struct CachedData {
GDMonoClass *class_SignalAttribute;
GDMonoClass *class_ToolAttribute;
GDMonoClass *class_RemoteAttribute;
- GDMonoClass *class_SyncAttribute;
+ GDMonoClass *class_MasterAttribute;
+ GDMonoClass *class_PuppetAttribute;
GDMonoClass *class_RemoteSyncAttribute;
GDMonoClass *class_MasterSyncAttribute;
GDMonoClass *class_PuppetSyncAttribute;
- GDMonoClass *class_MasterAttribute;
- GDMonoClass *class_PuppetAttribute;
- GDMonoClass *class_SlaveAttribute;
GDMonoClass *class_GodotMethodAttribute;
GDMonoField *field_GodotMethodAttribute_methodName;
diff --git a/modules/mono/mono_gd/gd_mono_class.cpp b/modules/mono/mono_gd/gd_mono_class.cpp
index 2132fd36f7..648f5f6c6b 100644
--- a/modules/mono/mono_gd/gd_mono_class.cpp
+++ b/modules/mono/mono_gd/gd_mono_class.cpp
@@ -166,8 +166,8 @@ void GDMonoClass::fetch_methods_with_godot_api_checks(GDMonoClass *p_native_base
#ifdef DEBUG_ENABLED
String fullname = method->get_ret_type_full_name() + " " + name + "(" + method->get_signature_desc(true) + ")";
- WARN_PRINTS("Method '" + fullname + "' is hidden by Godot API method. Should be '" +
- method->get_full_name_no_class() + "'. In class '" + namespace_name + "." + class_name + "'.");
+ WARN_PRINT("Method '" + fullname + "' is hidden by Godot API method. Should be '" +
+ method->get_full_name_no_class() + "'. In class '" + namespace_name + "." + class_name + "'.");
#endif
continue;
}
@@ -185,8 +185,8 @@ void GDMonoClass::fetch_methods_with_godot_api_checks(GDMonoClass *p_native_base
if (m && m->get_name() != name) {
// found
String fullname = m->get_ret_type_full_name() + " " + name + "(" + m->get_signature_desc(true) + ")";
- WARN_PRINTS("Method '" + fullname + "' should be '" + m->get_full_name_no_class() +
- "'. In class '" + namespace_name + "." + class_name + "'.");
+ WARN_PRINT("Method '" + fullname + "' should be '" + m->get_full_name_no_class() +
+ "'. In class '" + namespace_name + "." + class_name + "'.");
break;
}
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index 3e0f9a3f15..21d78483ee 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -247,37 +247,37 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
}
if (array_type->eklass == CACHED_CLASS_RAW(uint8_t)) {
- SET_FROM_ARRAY(PoolByteArray);
+ SET_FROM_ARRAY(PackedByteArray);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(int32_t)) {
- SET_FROM_ARRAY(PoolIntArray);
+ SET_FROM_ARRAY(PackedIntArray);
break;
}
if (array_type->eklass == REAL_T_MONOCLASS) {
- SET_FROM_ARRAY(PoolRealArray);
+ SET_FROM_ARRAY(PackedRealArray);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(String)) {
- SET_FROM_ARRAY(PoolStringArray);
+ SET_FROM_ARRAY(PackedStringArray);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(Vector2)) {
- SET_FROM_ARRAY(PoolVector2Array);
+ SET_FROM_ARRAY(PackedVector2Array);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(Vector3)) {
- SET_FROM_ARRAY(PoolVector3Array);
+ SET_FROM_ARRAY(PackedVector3Array);
break;
}
if (array_type->eklass == CACHED_CLASS_RAW(Color)) {
- SET_FROM_ARRAY(PoolColorArray);
+ SET_FROM_ARRAY(PackedColorArray);
break;
}
@@ -434,26 +434,26 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator Array(), CACHED_CLASS(Array));
mono_field_set_value(p_object, mono_field, managed);
} break;
- case Variant::POOL_BYTE_ARRAY: {
- SET_FROM_ARRAY(PoolByteArray);
+ case Variant::PACKED_BYTE_ARRAY: {
+ SET_FROM_ARRAY(PackedByteArray);
} break;
- case Variant::POOL_INT_ARRAY: {
- SET_FROM_ARRAY(PoolIntArray);
+ case Variant::PACKED_INT_ARRAY: {
+ SET_FROM_ARRAY(PackedIntArray);
} break;
- case Variant::POOL_REAL_ARRAY: {
- SET_FROM_ARRAY(PoolRealArray);
+ case Variant::PACKED_REAL_ARRAY: {
+ SET_FROM_ARRAY(PackedRealArray);
} break;
- case Variant::POOL_STRING_ARRAY: {
- SET_FROM_ARRAY(PoolStringArray);
+ case Variant::PACKED_STRING_ARRAY: {
+ SET_FROM_ARRAY(PackedStringArray);
} break;
- case Variant::POOL_VECTOR2_ARRAY: {
- SET_FROM_ARRAY(PoolVector2Array);
+ case Variant::PACKED_VECTOR2_ARRAY: {
+ SET_FROM_ARRAY(PackedVector2Array);
} break;
- case Variant::POOL_VECTOR3_ARRAY: {
- SET_FROM_ARRAY(PoolVector3Array);
+ case Variant::PACKED_VECTOR3_ARRAY: {
+ SET_FROM_ARRAY(PackedVector3Array);
} break;
- case Variant::POOL_COLOR_ARRAY: {
- SET_FROM_ARRAY(PoolColorArray);
+ case Variant::PACKED_COLOR_ARRAY: {
+ SET_FROM_ARRAY(PackedColorArray);
} break;
default: break;
}
@@ -512,7 +512,7 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
} break;
default: {
- ERR_PRINTS("Attempted to set the value of a field of unexpected type encoding: " + itos(type.type_encoding) + ".");
+ ERR_PRINT("Attempted to set the value of a field of unexpected type encoding: " + itos(type.type_encoding) + ".");
} break;
}
diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp
index 75aa77c7b0..74ffa90cb3 100644
--- a/modules/mono/mono_gd/gd_mono_internals.cpp
+++ b/modules/mono/mono_gd/gd_mono_internals.cpp
@@ -107,7 +107,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
ScriptInstance *si = CSharpInstance::create_for_managed_type(unmanaged, script.ptr(), gchandle);
- unmanaged->set_script_and_instance(script.get_ref_ptr(), si);
+ unmanaged->set_script_and_instance(script, si);
}
void unhandled_exception(MonoException *p_exc) {
diff --git a/modules/mono/mono_gd/gd_mono_log.cpp b/modules/mono/mono_gd/gd_mono_log.cpp
index ad68a4d90e..76828a66e0 100644
--- a/modules/mono/mono_gd/gd_mono_log.cpp
+++ b/modules/mono/mono_gd/gd_mono_log.cpp
@@ -83,7 +83,7 @@ void GDMonoLog::mono_log_callback(const char *log_domain, const char *log_level,
}
if (fatal) {
- ERR_PRINTS("Mono: FATAL ERROR, ABORTING! Logfile: '" + GDMonoLog::get_singleton()->log_file_path + "'.");
+ ERR_PRINT("Mono: FATAL ERROR, ABORTING! Logfile: '" + GDMonoLog::get_singleton()->log_file_path + "'.");
// Make sure to flush before aborting
f->flush();
f->close();
@@ -139,7 +139,7 @@ void GDMonoLog::initialize() {
CharString log_level = OS::get_singleton()->get_environment("GODOT_MONO_LOG_LEVEL").utf8();
if (log_level.length() != 0 && get_log_level_id(log_level.get_data()) == -1) {
- ERR_PRINTS(String() + "Mono: Ignoring invalid log level (GODOT_MONO_LOG_LEVEL): '" + log_level.get_data() + "'.");
+ ERR_PRINT(String() + "Mono: Ignoring invalid log level (GODOT_MONO_LOG_LEVEL): '" + log_level.get_data() + "'.");
log_level = CharString();
}
@@ -167,7 +167,7 @@ void GDMonoLog::initialize() {
log_file = FileAccess::open(log_file_path, FileAccess::WRITE);
if (!log_file) {
- ERR_PRINTS("Mono: Cannot create log file at: " + log_file_path);
+ ERR_PRINT("Mono: Cannot create log file at: " + log_file_path);
}
}
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index b81c20348d..63890f6066 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -113,25 +113,25 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) {
return Variant::ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(uint8_t))
- return Variant::POOL_BYTE_ARRAY;
+ return Variant::PACKED_BYTE_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(int32_t))
- return Variant::POOL_INT_ARRAY;
+ return Variant::PACKED_INT_ARRAY;
if (array_type->eklass == REAL_T_MONOCLASS)
- return Variant::POOL_REAL_ARRAY;
+ return Variant::PACKED_REAL_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(String))
- return Variant::POOL_STRING_ARRAY;
+ return Variant::PACKED_STRING_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(Vector2))
- return Variant::POOL_VECTOR2_ARRAY;
+ return Variant::PACKED_VECTOR2_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(Vector3))
- return Variant::POOL_VECTOR3_ARRAY;
+ return Variant::PACKED_VECTOR3_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(Color))
- return Variant::POOL_COLOR_ARRAY;
+ return Variant::PACKED_COLOR_ARRAY;
} break;
case MONO_TYPE_CLASS: {
@@ -277,7 +277,7 @@ String mono_to_utf8_string(MonoString *p_mono_string) {
char *utf8 = mono_string_to_utf8_checked(p_mono_string, &error);
if (!mono_error_ok(&error)) {
- ERR_PRINTS(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&error) + "'.");
+ ERR_PRINT(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&error) + "'.");
mono_error_cleanup(&error);
return String();
}
@@ -491,25 +491,25 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
return (MonoObject *)Array_to_mono_array(p_var->operator Array());
if (array_type->eklass == CACHED_CLASS_RAW(uint8_t))
- return (MonoObject *)PoolByteArray_to_mono_array(p_var->operator PoolByteArray());
+ return (MonoObject *)PackedByteArray_to_mono_array(p_var->operator PackedByteArray());
if (array_type->eklass == CACHED_CLASS_RAW(int32_t))
- return (MonoObject *)PoolIntArray_to_mono_array(p_var->operator PoolIntArray());
+ return (MonoObject *)PackedIntArray_to_mono_array(p_var->operator PackedIntArray());
if (array_type->eklass == REAL_T_MONOCLASS)
- return (MonoObject *)PoolRealArray_to_mono_array(p_var->operator PoolRealArray());
+ return (MonoObject *)PackedRealArray_to_mono_array(p_var->operator PackedRealArray());
if (array_type->eklass == CACHED_CLASS_RAW(String))
- return (MonoObject *)PoolStringArray_to_mono_array(p_var->operator PoolStringArray());
+ return (MonoObject *)PackedStringArray_to_mono_array(p_var->operator PackedStringArray());
if (array_type->eklass == CACHED_CLASS_RAW(Vector2))
- return (MonoObject *)PoolVector2Array_to_mono_array(p_var->operator PoolVector2Array());
+ return (MonoObject *)PackedVector2Array_to_mono_array(p_var->operator PackedVector2Array());
if (array_type->eklass == CACHED_CLASS_RAW(Vector3))
- return (MonoObject *)PoolVector3Array_to_mono_array(p_var->operator PoolVector3Array());
+ return (MonoObject *)PackedVector3Array_to_mono_array(p_var->operator PackedVector3Array());
if (array_type->eklass == CACHED_CLASS_RAW(Color))
- return (MonoObject *)PoolColorArray_to_mono_array(p_var->operator PoolColorArray());
+ return (MonoObject *)PackedColorArray_to_mono_array(p_var->operator PackedColorArray());
ERR_FAIL_V_MSG(NULL, "Attempted to convert Variant to a managed array of unmarshallable element type.");
} break;
@@ -638,20 +638,20 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
return GDMonoUtils::create_managed_from(p_var->operator Dictionary(), CACHED_CLASS(Dictionary));
case Variant::ARRAY:
return GDMonoUtils::create_managed_from(p_var->operator Array(), CACHED_CLASS(Array));
- case Variant::POOL_BYTE_ARRAY:
- return (MonoObject *)PoolByteArray_to_mono_array(p_var->operator PoolByteArray());
- case Variant::POOL_INT_ARRAY:
- return (MonoObject *)PoolIntArray_to_mono_array(p_var->operator PoolIntArray());
- case Variant::POOL_REAL_ARRAY:
- return (MonoObject *)PoolRealArray_to_mono_array(p_var->operator PoolRealArray());
- case Variant::POOL_STRING_ARRAY:
- return (MonoObject *)PoolStringArray_to_mono_array(p_var->operator PoolStringArray());
- case Variant::POOL_VECTOR2_ARRAY:
- return (MonoObject *)PoolVector2Array_to_mono_array(p_var->operator PoolVector2Array());
- case Variant::POOL_VECTOR3_ARRAY:
- return (MonoObject *)PoolVector3Array_to_mono_array(p_var->operator PoolVector3Array());
- case Variant::POOL_COLOR_ARRAY:
- return (MonoObject *)PoolColorArray_to_mono_array(p_var->operator PoolColorArray());
+ case Variant::PACKED_BYTE_ARRAY:
+ return (MonoObject *)PackedByteArray_to_mono_array(p_var->operator PackedByteArray());
+ case Variant::PACKED_INT_ARRAY:
+ return (MonoObject *)PackedIntArray_to_mono_array(p_var->operator PackedIntArray());
+ case Variant::PACKED_REAL_ARRAY:
+ return (MonoObject *)PackedRealArray_to_mono_array(p_var->operator PackedRealArray());
+ case Variant::PACKED_STRING_ARRAY:
+ return (MonoObject *)PackedStringArray_to_mono_array(p_var->operator PackedStringArray());
+ case Variant::PACKED_VECTOR2_ARRAY:
+ return (MonoObject *)PackedVector2Array_to_mono_array(p_var->operator PackedVector2Array());
+ case Variant::PACKED_VECTOR3_ARRAY:
+ return (MonoObject *)PackedVector3Array_to_mono_array(p_var->operator PackedVector3Array());
+ case Variant::PACKED_COLOR_ARRAY:
+ return (MonoObject *)PackedColorArray_to_mono_array(p_var->operator PackedColorArray());
default:
return NULL;
}
@@ -785,25 +785,25 @@ Variant mono_object_to_variant_impl(MonoObject *p_obj, const ManagedType &p_type
return mono_array_to_Array((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(uint8_t))
- return mono_array_to_PoolByteArray((MonoArray *)p_obj);
+ return mono_array_to_PackedByteArray((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(int32_t))
- return mono_array_to_PoolIntArray((MonoArray *)p_obj);
+ return mono_array_to_PackedIntArray((MonoArray *)p_obj);
if (array_type->eklass == REAL_T_MONOCLASS)
- return mono_array_to_PoolRealArray((MonoArray *)p_obj);
+ return mono_array_to_PackedRealArray((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(String))
- return mono_array_to_PoolStringArray((MonoArray *)p_obj);
+ return mono_array_to_PackedStringArray((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(Vector2))
- return mono_array_to_PoolVector2Array((MonoArray *)p_obj);
+ return mono_array_to_PackedVector2Array((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(Vector3))
- return mono_array_to_PoolVector3Array((MonoArray *)p_obj);
+ return mono_array_to_PackedVector3Array((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(Color))
- return mono_array_to_PoolColorArray((MonoArray *)p_obj);
+ return mono_array_to_PackedColorArray((MonoArray *)p_obj);
if (p_fail_with_err) {
ERR_FAIL_V_MSG(Variant(), "Attempted to convert a managed array of unmarshallable element type to Variant.");
@@ -987,8 +987,8 @@ Array mono_array_to_Array(MonoArray *p_array) {
// TODO: Use memcpy where possible
-MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array) {
- PoolIntArray::Read r = p_array.read();
+MonoArray *PackedIntArray_to_mono_array(const PackedIntArray &p_array) {
+ const int *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(int32_t), p_array.size());
@@ -999,13 +999,13 @@ MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array) {
return ret;
}
-PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array) {
- PoolIntArray ret;
+PackedIntArray mono_array_to_PackedIntArray(MonoArray *p_array) {
+ PackedIntArray ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolIntArray::Write w = ret.write();
+ int *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = mono_array_get(p_array, int32_t, i);
@@ -1014,8 +1014,8 @@ PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array) {
- PoolByteArray::Read r = p_array.read();
+MonoArray *PackedByteArray_to_mono_array(const PackedByteArray &p_array) {
+ const uint8_t *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(uint8_t), p_array.size());
@@ -1026,13 +1026,13 @@ MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array) {
return ret;
}
-PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array) {
- PoolByteArray ret;
+PackedByteArray mono_array_to_PackedByteArray(MonoArray *p_array) {
+ PackedByteArray ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolByteArray::Write w = ret.write();
+ uint8_t *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = mono_array_get(p_array, uint8_t, i);
@@ -1041,8 +1041,8 @@ PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array) {
- PoolRealArray::Read r = p_array.read();
+MonoArray *PackedRealArray_to_mono_array(const PackedRealArray &p_array) {
+ const real_t *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), REAL_T_MONOCLASS, p_array.size());
@@ -1053,13 +1053,13 @@ MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array) {
return ret;
}
-PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array) {
- PoolRealArray ret;
+PackedRealArray mono_array_to_PackedRealArray(MonoArray *p_array) {
+ PackedRealArray ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolRealArray::Write w = ret.write();
+ real_t *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = mono_array_get(p_array, real_t, i);
@@ -1068,8 +1068,8 @@ PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array) {
- PoolStringArray::Read r = p_array.read();
+MonoArray *PackedStringArray_to_mono_array(const PackedStringArray &p_array) {
+ const String *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(String), p_array.size());
@@ -1081,13 +1081,13 @@ MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array) {
return ret;
}
-PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array) {
- PoolStringArray ret;
+PackedStringArray mono_array_to_PackedStringArray(MonoArray *p_array) {
+ PackedStringArray ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolStringArray::Write w = ret.write();
+ String *w = ret.ptrw();
for (int i = 0; i < length; i++) {
MonoString *elem = mono_array_get(p_array, MonoString *, i);
@@ -1097,8 +1097,8 @@ PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array) {
- PoolColorArray::Read r = p_array.read();
+MonoArray *PackedColorArray_to_mono_array(const PackedColorArray &p_array) {
+ const Color *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(Color), p_array.size());
@@ -1110,13 +1110,13 @@ MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array) {
return ret;
}
-PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array) {
- PoolColorArray ret;
+PackedColorArray mono_array_to_PackedColorArray(MonoArray *p_array) {
+ PackedColorArray ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolColorArray::Write w = ret.write();
+ Color *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = MARSHALLED_IN(Color, (M_Color *)mono_array_addr_with_size(p_array, sizeof(M_Color), i));
@@ -1125,8 +1125,8 @@ PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array) {
- PoolVector2Array::Read r = p_array.read();
+MonoArray *PackedVector2Array_to_mono_array(const PackedVector2Array &p_array) {
+ const Vector2 *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(Vector2), p_array.size());
@@ -1138,13 +1138,13 @@ MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array) {
return ret;
}
-PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array) {
- PoolVector2Array ret;
+PackedVector2Array mono_array_to_PackedVector2Array(MonoArray *p_array) {
+ PackedVector2Array ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolVector2Array::Write w = ret.write();
+ Vector2 *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = MARSHALLED_IN(Vector2, (M_Vector2 *)mono_array_addr_with_size(p_array, sizeof(M_Vector2), i));
@@ -1153,8 +1153,8 @@ PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array) {
return ret;
}
-MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array) {
- PoolVector3Array::Read r = p_array.read();
+MonoArray *PackedVector3Array_to_mono_array(const PackedVector3Array &p_array) {
+ const Vector3 *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(Vector3), p_array.size());
@@ -1166,13 +1166,13 @@ MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array) {
return ret;
}
-PoolVector3Array mono_array_to_PoolVector3Array(MonoArray *p_array) {
- PoolVector3Array ret;
+PackedVector3Array mono_array_to_PackedVector3Array(MonoArray *p_array) {
+ PackedVector3Array ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
ret.resize(length);
- PoolVector3Array::Write w = ret.write();
+ Vector3 *w = ret.ptrw();
for (int i = 0; i < length; i++) {
w[i] = MARSHALLED_IN(Vector3, (M_Vector3 *)mono_array_addr_with_size(p_array, sizeof(M_Vector3), i));
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index e662e7814e..d3527109ff 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -127,40 +127,40 @@ String mono_object_to_variant_string(MonoObject *p_obj, MonoException **r_exc);
MonoArray *Array_to_mono_array(const Array &p_array);
Array mono_array_to_Array(MonoArray *p_array);
-// PoolIntArray
+// PackedIntArray
-MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array);
-PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array);
+MonoArray *PackedIntArray_to_mono_array(const PackedIntArray &p_array);
+PackedIntArray mono_array_to_PackedIntArray(MonoArray *p_array);
-// PoolByteArray
+// PackedByteArray
-MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array);
-PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array);
+MonoArray *PackedByteArray_to_mono_array(const PackedByteArray &p_array);
+PackedByteArray mono_array_to_PackedByteArray(MonoArray *p_array);
-// PoolRealArray
+// PackedRealArray
-MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array);
-PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array);
+MonoArray *PackedRealArray_to_mono_array(const PackedRealArray &p_array);
+PackedRealArray mono_array_to_PackedRealArray(MonoArray *p_array);
-// PoolStringArray
+// PackedStringArray
-MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array);
-PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array);
+MonoArray *PackedStringArray_to_mono_array(const PackedStringArray &p_array);
+PackedStringArray mono_array_to_PackedStringArray(MonoArray *p_array);
-// PoolColorArray
+// PackedColorArray
-MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array);
-PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array);
+MonoArray *PackedColorArray_to_mono_array(const PackedColorArray &p_array);
+PackedColorArray mono_array_to_PackedColorArray(MonoArray *p_array);
-// PoolVector2Array
+// PackedVector2Array
-MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array);
-PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array);
+MonoArray *PackedVector2Array_to_mono_array(const PackedVector2Array &p_array);
+PackedVector2Array mono_array_to_PackedVector2Array(MonoArray *p_array);
-// PoolVector3Array
+// PackedVector3Array
-MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array);
-PoolVector3Array mono_array_to_PoolVector3Array(MonoArray *p_array);
+MonoArray *PackedVector3Array_to_mono_array(const PackedVector3Array &p_array);
+PackedVector3Array mono_array_to_PackedVector3Array(MonoArray *p_array);
// Structures
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp
index 4e7f590a69..05077a00c4 100644
--- a/modules/mono/mono_gd/gd_mono_utils.cpp
+++ b/modules/mono/mono_gd/gd_mono_utils.cpp
@@ -354,7 +354,7 @@ void debug_send_unhandled_exception_error(MonoException *p_exc) {
if (!ScriptDebugger::get_singleton()) {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
- ERR_PRINTS(GDMonoUtils::get_exception_name_and_message(p_exc));
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(p_exc));
}
#endif
return;
@@ -431,7 +431,7 @@ void set_pending_exception(MonoException *p_exc) {
}
if (!mono_runtime_set_pending_exception(p_exc, false)) {
- ERR_PRINTS("Exception thrown from managed code, but it could not be set as pending:");
+ ERR_PRINT("Exception thrown from managed code, but it could not be set as pending:");
GDMonoUtils::debug_print_unhandled_exception(p_exc);
}
#endif