*
* Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
* Copyright 2004-2009 Novell, Inc (http://www.novell.com)
- * Copyright 2011 Xamarin Inc (http://www.xamarin.com).
+ * Copyright 2011-2012 Xamarin Inc (http://www.xamarin.com).
*/
#include <config.h>
gint a [4], b [4];
MonoException *exc;
+ int havePadding = 0;
ignored = 0;
last = prev_last = 0, prev2_last = 0;
for (i = 0; i < ilength; i++) {
mono_raise_exception (exc);
} else if (isspace (c)) {
ignored++;
+ } else if (havePadding && c != '=') {
+ exc = mono_exception_from_name_msg (mono_get_corlib (),
+ "System", "FormatException",
+ "Invalid character found.");
+ mono_raise_exception (exc);
} else {
+ if (c == '=') havePadding = 1;
prev2_last = prev_last;
prev_last = last;
last = c;
return nspacelen + cnamelen;
}
+#ifdef DISABLE_ICALL_TABLES
static void
no_icall_table (void)
{
g_assert_not_reached ();
}
+#endif
gpointer
mono_lookup_internal_call (MonoMethod *method)
int typelen = 0, mlen, siglen;
gpointer res;
#ifndef DISABLE_ICALL_TABLES
- const IcallTypeDesc *imap;
+ const IcallTypeDesc *imap = NULL;
#endif
g_assert (method != NULL);
return NULL;
}
+#ifndef DISABLE_ICALL_TABLES
+ imap = find_class_icalls (mname);
+#endif
+
mname [typelen] = ':';
mname [typelen + 1] = ':';
#ifdef DISABLE_ICALL_TABLES
mono_loader_unlock ();
/* Fail only when the result is actually used */
- return no_icall_table;
+ /* mono_marshal_get_native_wrapper () depends on this */
+ if (method->klass == mono_defaults.string_class && !strcmp (method->name, ".ctor"))
+ return ves_icall_System_String_ctor_RedirectToCreateString;
+ else
+ return no_icall_table;
#else
- imap = find_class_icalls (mname);
-
/* it wasn't found in the static call tables */
if (!imap) {
mono_loader_unlock ();
#endif
}
+#ifdef ENABLE_ICALL_SYMBOL_MAP
static int
func_cmp (gconstpointer key, gconstpointer p)
{
return (gsize)key - (gsize)*(gsize*)p;
}
+#endif
/*
* mono_lookup_icall_symbol: