diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-01-04 21:50:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 21:50:04 +0100 |
commit | 0f8ac21592dd2569bf03c97b9d7744ff51be6342 (patch) | |
tree | b875ba769871e5ac38ff1646f5f19a8c767a4fed /modules/mono/mono_gd/gd_mono_marshal.cpp | |
parent | db3f87d49171024cce3757c102db7de55b5b2c8c (diff) | |
parent | 119a910bc6b7472f014773997bc036a461b44a38 (diff) |
Merge pull request #15346 from neikeq/properties-are-overrated
Mono: Add properties support in scripts
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_marshal.cpp')
-rw-r--r-- | modules/mono/mono_gd/gd_mono_marshal.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp index 48d08b159c..c2dbbc87ff 100644 --- a/modules/mono/mono_gd/gd_mono_marshal.cpp +++ b/modules/mono/mono_gd/gd_mono_marshal.cpp @@ -113,7 +113,7 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) { if (tclass == CACHED_CLASS(Plane)) return Variant::PLANE; - if (mono_class_is_enum(tclass->get_raw())) + if (mono_class_is_enum(tclass->get_mono_ptr())) return Variant::INT; } break; @@ -164,7 +164,7 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) { } break; case MONO_TYPE_GENERICINST: { - if (CACHED_RAW_MONO_CLASS(Dictionary) == p_type.type_class->get_raw()) { + if (CACHED_RAW_MONO_CLASS(Dictionary) == p_type.type_class->get_mono_ptr()) { return Variant::DICTIONARY; } } break; @@ -306,9 +306,9 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty if (tclass == CACHED_CLASS(Plane)) RETURN_BOXED_STRUCT(Plane, p_var); - if (mono_class_is_enum(tclass->get_raw())) { + if (mono_class_is_enum(tclass->get_mono_ptr())) { int val = p_var->operator signed int(); - return BOX_ENUM(tclass->get_raw(), val); + return BOX_ENUM(tclass->get_mono_ptr(), val); } } break; @@ -432,7 +432,7 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty } break; case MONO_TYPE_GENERICINST: { - if (CACHED_RAW_MONO_CLASS(Dictionary) == p_type.type_class->get_raw()) { + if (CACHED_RAW_MONO_CLASS(Dictionary) == p_type.type_class->get_mono_ptr()) { return Dictionary_to_mono_object(p_var->operator Dictionary()); } } break; @@ -528,7 +528,7 @@ Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) { if (tclass == CACHED_CLASS(Plane)) RETURN_UNBOXED_STRUCT(Plane, p_obj); - if (mono_class_is_enum(tclass->get_raw())) + if (mono_class_is_enum(tclass->get_mono_ptr())) return unbox<int32_t>(p_obj); } break; @@ -585,7 +585,7 @@ Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) { } break; case MONO_TYPE_GENERICINST: { - if (CACHED_RAW_MONO_CLASS(Dictionary) == p_type.type_class->get_raw()) { + if (CACHED_RAW_MONO_CLASS(Dictionary) == p_type.type_class->get_mono_ptr()) { return mono_object_to_Dictionary(p_obj); } } break; |