#ifdef __CYGWIN__
#define mono_map_dll(name) (name)
#else
-static char *dll_map[] = {
+static const char *dll_map[] = {
"libc", "libc.so.6",
"libm", "libm.so.6",
"cygwin1.dll", "libc.so.6",
static GHashTable *icall_hash = NULL;
void
-mono_add_internal_call (const char *name, gpointer method)
+mono_add_internal_call (const char *name, gconstpointer method)
{
if (!icall_hash) {
dummy_icall = FALSE;
}
static void
-ves_icall_dummy ()
+ves_icall_dummy (void)
{
g_warning ("the mono runtime is not initialized");
g_assert_not_reached ();
guint32 nindex, class, i;
const char *fname, *name, *nspace;
const char *ptr;
- guint32 index = mono_metadata_token_index (token);
+ guint32 idx = mono_metadata_token_index (token);
- mono_metadata_decode_row (&tables [MONO_TABLE_MEMBERREF], index-1, cols, MONO_MEMBERREF_SIZE);
+ mono_metadata_decode_row (&tables [MONO_TABLE_MEMBERREF], idx-1, cols, MONO_MEMBERREF_SIZE);
nindex = cols [MONO_MEMBERREF_CLASS] >> MEMBERREF_PARENT_BITS;
class = cols [MONO_MEMBERREF_CLASS] & MEMBERREF_PARENT_MASK;
}
static MonoMethod *
-method_from_memberref (MonoImage *image, guint32 index)
+method_from_memberref (MonoImage *image, guint32 idx)
{
MonoImage *mimage;
MonoClass *klass;
MonoMethodSignature *sig;
const char *ptr;
- mono_metadata_decode_row (&tables [MONO_TABLE_MEMBERREF], index-1, cols, 3);
+ mono_metadata_decode_row (&tables [MONO_TABLE_MEMBERREF], idx-1, cols, 3);
nindex = cols [MONO_MEMBERREF_CLASS] >> MEMBERREF_PARENT_BITS;
class = cols [MONO_MEMBERREF_CLASS] & MEMBERREF_PARENT_MASK;
/*g_print ("methodref: 0x%x 0x%x %s\n", class, nindex,
}
static void
-fill_pinvoke_info (MonoImage *image, MonoMethodPInvoke *piinfo, int index)
+fill_pinvoke_info (MonoImage *image, MonoMethodPInvoke *piinfo, int idx)
{
MonoMethod *mh = &piinfo->method;
MonoTableInfo *tables = image->tables;
mono_metadata_decode_row (im, i, im_cols, 4);
- if ((im_cols[1] >> 1) == index + 1) {
+ if ((im_cols[1] >> 1) == idx + 1) {
import = mono_metadata_string_heap (image, im_cols [2]);
{
MonoMethod *result;
int table = mono_metadata_token_table (token);
- int index = mono_metadata_token_index (token);
+ int idx = mono_metadata_token_index (token);
MonoTableInfo *tables = image->tables;
const char *loc, *sig = NULL;
char *name;
if (table != MONO_TABLE_MEMBERREF)
g_print("got wrong token: 0x%08x\n", token);
g_assert (table == MONO_TABLE_MEMBERREF);
- result = method_from_memberref (image, index);
+ result = method_from_memberref (image, idx);
g_hash_table_insert (image->method_cache, GINT_TO_POINTER (token), result);
return result;
}
- mono_metadata_decode_row (&tables [table], index - 1, cols, 6);
+ mono_metadata_decode_row (&tables [table], idx - 1, cols, 6);
if ((cols [2] & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
(cols [1] & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL))
g_free (name);
result->flags |= METHOD_ATTRIBUTE_PINVOKE_IMPL;
} else if (cols [2] & METHOD_ATTRIBUTE_PINVOKE_IMPL) {
- fill_pinvoke_info (image, (MonoMethodPInvoke *)result, index - 1);
+ fill_pinvoke_info (image, (MonoMethodPInvoke *)result, idx - 1);
} else {
/* if this is a methodref from another module/assembly, this fails */
loc = mono_cli_rva_map ((MonoCLIImageInfo *)image->image_info, cols [0]);
for (i = 0; i < klass->method.count; ++i) {
if (method == klass->methods [i]) {
- guint32 index = klass->method.first + i;
+ guint32 idx = klass->method.first + i;
guint32 cols [MONO_PARAM_SIZE];
- guint param_index = mono_metadata_decode_row_col (methodt, index, MONO_METHOD_PARAMLIST);
+ guint param_index = mono_metadata_decode_row_col (methodt, idx, MONO_METHOD_PARAMLIST);
- if (index < methodt->rows)
- lastp = mono_metadata_decode_row_col (methodt, index + 1, MONO_METHOD_PARAMLIST);
+ if (idx < methodt->rows)
+ lastp = mono_metadata_decode_row_col (methodt, idx + 1, MONO_METHOD_PARAMLIST);
else
lastp = paramt->rows;
for (i = param_index; i < lastp; ++i) {