[Mono-dev] [Fwd: [Mono-patches] r54798 - trunk/mono/mono/metadata]
Atsushi Eno
atsushi at ximian.com
Thu Jan 5 05:56:44 EST 2006
Hi Sebastien,
I think this (and until r54800) breaks Assembly.CodeBase on Windows,
which resulted in that nunit does not run fine. Can you please
revisit there? I know that your change is anyways needed, just
another kind of fix would be wanted.
I tried to change Assembly.CodeBase to escape at any time (as
it used to do) and nunit started to work fine.
Atsushi Eno
-------- Original Message --------
Subject: [Mono-patches] r54798 - trunk/mono/mono/metadata
Date: Fri, 23 Dec 2005 15:28:05 -0500 (EST)
From: Sebastien Pouliot (sebastien at ximian.com)
<mono-patches-list at lists.ximian.com>
To: mono-patches at lists.ximian.com, ximian.monolist at gmail.com,
mono-patches-list at googlegroups.com
Author: spouliot
Date: 2005-12-23 15:28:05 -0500 (Fri, 23 Dec 2005)
New Revision: 54798
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/appdomain.c
trunk/mono/mono/metadata/icall.c
Log:
icall.c: get_code_base can now return a non-escaped path.
CurrentTimeZone renamed to CurrentSystemTimeZone for serialization
interoperability. Bumped corlib version in appdomain.c
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2005-12-23 20:26:48 UTC (rev 54797)
+++ trunk/mono/mono/metadata/ChangeLog 2005-12-23 20:28:05 UTC (rev 54798)
@@ -1,3 +1,11 @@
+2005-12-23 Sebastien Pouliot <sebastien at ximian.com>
+
+ * appdomain.c: Bump corlib version to 46.
+ * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
+ serialization purpose) and changed ves_icall_System_Reflection_
+ Assembly_get_code_base signature to accept a boolean (to escape, or
+ not, the assembly code base).
+
2005-12-23 Dick Porter <dick at ximian.com>
* icall.c:
Modified: trunk/mono/mono/metadata/appdomain.c
===================================================================
--- trunk/mono/mono/metadata/appdomain.c 2005-12-23 20:26:48 UTC (rev 54797)
+++ trunk/mono/mono/metadata/appdomain.c 2005-12-23 20:28:05 UTC (rev 54798)
@@ -30,7 +30,7 @@
#include <mono/metadata/threadpool.h>
#include <mono/utils/mono-uri.h>
-#define MONO_CORLIB_VERSION 45
+#define MONO_CORLIB_VERSION 46
CRITICAL_SECTION mono_delegate_section;
Modified: trunk/mono/mono/metadata/icall.c
===================================================================
--- trunk/mono/mono/metadata/icall.c 2005-12-23 20:26:48 UTC (rev 54797)
+++ trunk/mono/mono/metadata/icall.c 2005-12-23 20:28:05 UTC (rev 54798)
@@ -3592,20 +3592,27 @@
}
static MonoString *
-ves_icall_System_Reflection_Assembly_get_code_base
(MonoReflectionAssembly *assembly)
+ves_icall_System_Reflection_Assembly_get_code_base
(MonoReflectionAssembly *assembly, MonoBoolean escaped)
{
MonoDomain *domain = mono_object_domain (assembly);
MonoAssembly *mass = assembly->assembly;
- MonoString *res;
+ MonoString *res = NULL;
gchar *uri;
gchar *absolute;
MONO_ARCH_SAVE_REGS;
absolute = g_build_filename (mass->basedir, mass->image->module_name,
NULL);
- uri = g_filename_to_uri (absolute, NULL, NULL);
- res = mono_string_new (domain, uri);
- g_free (uri);
+ if (escaped) {
+ uri = g_filename_to_uri (absolute, NULL, NULL);
+ } else {
+ uri = g_strconcat ("file://", absolute, NULL);
+ }
+
+ if (uri) {
+ res = mono_string_new (domain, uri);
+ g_free (uri);
+ }
g_free (absolute);
return res;
}
@@ -5029,7 +5036,7 @@
* Returns true on success and zero on failure.
*/
static guint32
-ves_icall_System_CurrentTimeZone_GetTimeZoneData (guint32 year,
MonoArray **data, MonoArray **names)
+ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData (guint32 year,
MonoArray **data, MonoArray **names)
{
#ifndef PLATFORM_WIN32
MonoDomain *domain = mono_domain_get ();
@@ -6295,7 +6302,7 @@
};
static const IcallEntry timezone_icalls [] = {
- {"GetTimeZoneData", ves_icall_System_CurrentTimeZone_GetTimeZoneData}
+ {"GetTimeZoneData",
ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData}
};
static const IcallEntry datetime_icalls [] = {
@@ -7102,7 +7109,7 @@
{"System.Configuration.DefaultConfig", defaultconf_icalls,
G_N_ELEMENTS (defaultconf_icalls)},
{"System.ConsoleDriver", consoledriver_icalls, G_N_ELEMENTS
(consoledriver_icalls)},
{"System.Convert", convert_icalls, G_N_ELEMENTS (convert_icalls)},
- {"System.CurrentTimeZone", timezone_icalls, G_N_ELEMENTS
(timezone_icalls)},
+ {"System.CurrentSystemTimeZone", timezone_icalls, G_N_ELEMENTS
(timezone_icalls)},
{"System.DateTime", datetime_icalls, G_N_ELEMENTS (datetime_icalls)},
#ifndef DISABLE_DECIMAL
{"System.Decimal", decimal_icalls, G_N_ELEMENTS (decimal_icalls)},
_______________________________________________
Mono-patches maillist - Mono-patches at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches
More information about the Mono-devel-list
mailing list