Skip to content

Commit

Permalink
[meta] Add mono_type_get_name_full to public API
Browse files Browse the repository at this point in the history
This is needed by Xamarin.Android to be able to round-trip with names fetched via reflection, as the only public API for this (`mono_type_get_name`) uses the IL format instead.

Fixes mono#19377
  • Loading branch information
CoffeeFlux authored and monojenkins committed Apr 2, 2020
1 parent 7bfb441 commit 7412c0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 0 additions & 10 deletions mono/metadata/class-internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ typedef enum {
MONO_WRAPPER_NUM
} MonoWrapperType;

typedef enum {
MONO_TYPE_NAME_FORMAT_IL,
MONO_TYPE_NAME_FORMAT_REFLECTION,
MONO_TYPE_NAME_FORMAT_FULL_NAME,
MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED
} MonoTypeNameFormat;

typedef enum {
MONO_REMOTING_TARGET_UNKNOWN,
MONO_REMOTING_TARGET_APPDOMAIN,
Expand Down Expand Up @@ -1150,9 +1143,6 @@ mono_class_get_exception_for_failure (MonoClass *klass);
char*
mono_identifier_escape_type_name_chars (const char* identifier);

char*
mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format);

char*
mono_type_get_full_name (MonoClass *klass);

Expand Down
10 changes: 10 additions & 0 deletions mono/metadata/class.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ typedef struct _MonoClassField MonoClassField;
typedef struct _MonoProperty MonoProperty;
typedef struct _MonoEvent MonoEvent;

typedef enum {
MONO_TYPE_NAME_FORMAT_IL,
MONO_TYPE_NAME_FORMAT_REFLECTION,
MONO_TYPE_NAME_FORMAT_FULL_NAME,
MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED
} MonoTypeNameFormat;

MONO_API MONO_RT_EXTERNAL_ONLY
MonoClass *
mono_class_get (MonoImage *image, uint32_t type_token);
Expand Down Expand Up @@ -130,6 +137,9 @@ MONO_API MONO_RT_EXTERNAL_ONLY
void*
mono_ldtoken (MonoImage *image, uint32_t token, MonoClass **retclass, MonoGenericContext *context);

MONO_API char *
mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format);

MONO_API char*
mono_type_get_name (MonoType *type);

Expand Down

0 comments on commit 7412c0e

Please sign in to comment.