Author: gert
Date: 2008-02-10 12:50:54 -0500 (Sun, 10 Feb 2008)
New Revision: 95390
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/assembly.c
trunk/mono/mono/metadata/class.c
trunk/mono/mono/metadata/icall-def.h
trunk/mono/mono/metadata/icall.c
Log:
* class.c: Include Retargetable spec in assembly name.
* assembly.c: Always include PublicKeyToken spec in assembly name
(with value "null" if assembly is not signed), and include
Retargetable spec.
* icall-def.h: Added icall for Assembly.get_fullname.
* icall.c: Added icall returning the fullname of an assembly.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2008-02-10 17:32:04 UTC (rev 95389)
+++ trunk/mono/mono/metadata/ChangeLog 2008-02-10 17:50:54 UTC (rev 95390)
@@ -1,3 +1,12 @@
+2008-02-10 Gert Driesen <[EMAIL PROTECTED]>
+
+ * class.c: Include Retargetable spec in assembly name.
+ * assembly.c: Always include PublicKeyToken spec in assembly name
+ (with value "null" if assembly is not signed), and include
+ Retargetable spec.
+ * icall-def.h: Added icall for Assembly.get_fullname.
+ * icall.c: Added icall returning the fullname of an assembly.
+
2008-02-09 Zoltan Varga <[EMAIL PROTECTED]>
* class.c (mono_class_setup_vtable_general): Add a missing call to
Modified: trunk/mono/mono/metadata/assembly.c
===================================================================
--- trunk/mono/mono/metadata/assembly.c 2008-02-10 17:32:04 UTC (rev 95389)
+++ trunk/mono/mono/metadata/assembly.c 2008-02-10 17:50:54 UTC (rev 95390)
@@ -695,12 +695,12 @@
mono_stringify_assembly_name (MonoAssemblyName *aname)
{
return g_strdup_printf (
- "%s, Version=%d.%d.%d.%d, Culture=%s%s%s",
+ "%s, Version=%d.%d.%d.%d, Culture=%s, PublicKeyToken=%s%s",
aname->name,
aname->major, aname->minor, aname->build, aname->revision,
aname->culture && *aname->culture? aname->culture: "neutral",
- aname->public_key_token [0] ? ", PublicKeyToken=" : "",
- aname->public_key_token [0] ? (char *)aname->public_key_token :
"");
+ aname->public_key_token [0] ? (char *)aname->public_key_token :
"null",
+ (aname->flags & ASSEMBLYREF_RETARGETABLE_FLAG) ? ",
Retargetable=Yes" : "");
}
static gchar*
Modified: trunk/mono/mono/metadata/class.c
===================================================================
--- trunk/mono/mono/metadata/class.c 2008-02-10 17:32:04 UTC (rev 95389)
+++ trunk/mono/mono/metadata/class.c 2008-02-10 17:50:54 UTC (rev 95390)
@@ -181,11 +181,12 @@
MonoAssembly *ta = klass->image->assembly;
g_string_append_printf (
- str, ", %s, Version=%d.%d.%d.%d, Culture=%s, PublicKeyToken=%s",
+ str, ", %s, Version=%d.%d.%d.%d, Culture=%s,
PublicKeyToken=%s%s",
ta->aname.name,
ta->aname.major, ta->aname.minor, ta->aname.build,
ta->aname.revision,
ta->aname.culture && *ta->aname.culture? ta->aname.culture:
"neutral",
- ta->aname.public_key_token [0] ? (char
*)ta->aname.public_key_token : "null");
+ ta->aname.public_key_token [0] ? (char
*)ta->aname.public_key_token : "null",
+ (ta->aname.flags & ASSEMBLYREF_RETARGETABLE_FLAG) ? ",
Retargetable=Yes" : "");
}
static inline void
Modified: trunk/mono/mono/metadata/icall-def.h
===================================================================
--- trunk/mono/mono/metadata/icall-def.h 2008-02-10 17:32:04 UTC (rev
95389)
+++ trunk/mono/mono/metadata/icall-def.h 2008-02-10 17:50:54 UTC (rev
95390)
@@ -428,9 +428,10 @@
ICALL(ASSEM_20, "get_EntryPoint",
ves_icall_System_Reflection_Assembly_get_EntryPoint)
ICALL(ASSEM_21, "get_ReflectionOnly",
ves_icall_System_Reflection_Assembly_get_ReflectionOnly)
ICALL(ASSEM_22, "get_code_base",
ves_icall_System_Reflection_Assembly_get_code_base)
-ICALL(ASSEM_23, "get_global_assembly_cache",
ves_icall_System_Reflection_Assembly_get_global_assembly_cache)
-ICALL(ASSEM_24, "get_location",
ves_icall_System_Reflection_Assembly_get_location)
-ICALL(ASSEM_25, "load_with_partial_name",
ves_icall_System_Reflection_Assembly_load_with_partial_name)
+ICALL(ASSEM_23, "get_fullname",
ves_icall_System_Reflection_Assembly_get_fullName)
+ICALL(ASSEM_24, "get_global_assembly_cache",
ves_icall_System_Reflection_Assembly_get_global_assembly_cache)
+ICALL(ASSEM_25, "get_location",
ves_icall_System_Reflection_Assembly_get_location)
+ICALL(ASSEM_26, "load_with_partial_name",
ves_icall_System_Reflection_Assembly_load_with_partial_name)
ICALL_TYPE(ASSEMN, "System.Reflection.AssemblyName", ASSEMN_1)
ICALL(ASSEMN_1, "ParseName",
ves_icall_System_Reflection_AssemblyName_ParseName)
Modified: trunk/mono/mono/metadata/icall.c
===================================================================
--- trunk/mono/mono/metadata/icall.c 2008-02-10 17:32:04 UTC (rev 95389)
+++ trunk/mono/mono/metadata/icall.c 2008-02-10 17:50:54 UTC (rev 95390)
@@ -4782,6 +4782,28 @@
}
}
+static MonoString *
+ves_icall_System_Reflection_Assembly_get_fullName (MonoReflectionAssembly
*assembly)
+{
+ MonoDomain *domain = mono_object_domain (assembly);
+ MonoAssembly *mass = assembly->assembly;
+ MonoString *res;
+ gchar *name;
+
+ name = g_strdup_printf (
+ "%s, Version=%d.%d.%d.%d, Culture=%s, PublicKeyToken=%s%s",
+ mass->aname.name,
+ mass->aname.major, mass->aname.minor, mass->aname.build,
mass->aname.revision,
+ mass->aname.culture && *mass->aname.culture?
mass->aname.culture: "neutral",
+ mass->aname.public_key_token [0] ? (char
*)mass->aname.public_key_token : "null",
+ (mass->aname.flags & ASSEMBLYREF_RETARGETABLE_FLAG) ? ",
Retargetable=Yes" : "");
+
+ res = mono_string_new (domain, name);
+ g_free (name);
+
+ return res;
+}
+
static void
ves_icall_System_Reflection_Assembly_FillName (MonoReflectionAssembly
*assembly, MonoReflectionAssemblyName *aname)
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches