Add mono_reflection_type_get_type () api function to return the MonoType* correspondi...
authorZoltan Varga <vargaz@gmail.com>
Wed, 14 Dec 2011 08:03:12 +0000 (09:03 +0100)
committerZoltan Varga <vargaz@gmail.com>
Wed, 14 Dec 2011 08:03:30 +0000 (09:03 +0100)
mono/metadata/reflection.c
mono/metadata/reflection.h

index e5316752e59d908055b57aae0f3d52a89e623f8b..c5ae3b9a8de435181fc20128cb10652574ef8848 100644 (file)
@@ -12554,3 +12554,18 @@ mono_reflection_call_is_assignable_to (MonoClass *klass, MonoClass *oklass)
        else
                return *(MonoBoolean*)mono_object_unbox (res);
 }
+
+/**
+ * mono_reflection_type_get_type:
+ * @reftype: the System.Type object
+ *
+ * Returns the MonoType* associated with the C# System.Type object @reftype.
+ */
+MonoType*
+mono_reflection_type_get_type (MonoReflectionType *reftype)
+{
+       g_assert (reftype);
+
+       return reftype->type;
+}
+
index 90233870c6110f5b149afdba00edfa09d1dc5058..494a9a76216685d6999e76d46603f5effd33f8e4 100644 (file)
@@ -132,6 +132,8 @@ MonoBoolean mono_declsec_get_method_action (MonoMethod *method, uint32_t action,
 MonoBoolean mono_declsec_get_class_action (MonoClass *klass, uint32_t action, MonoDeclSecurityEntry *entry);
 MonoBoolean mono_declsec_get_assembly_action (MonoAssembly *assembly, uint32_t action, MonoDeclSecurityEntry *entry);
 
+MonoType* mono_reflection_type_get_type (MonoReflectionType *reftype);
+
 MONO_END_DECLS
 
 #endif /* __METADATA_REFLECTION_H__ */