change icall to use gsize as well
authorMichael DeRoy <mderoy@student.umass.edu>
Thu, 30 Mar 2017 18:23:50 +0000 (14:23 -0400)
committerBernhard Urban <bernhard.urban@xamarin.com>
Fri, 31 Mar 2017 13:47:57 +0000 (09:47 -0400)
mono/metadata/marshal.c

index c639bda2efe31db3a121a7354096e9c535b910f2..3ea30713cc8c975eb4c9578f49246e10d16ef547 100644 (file)
@@ -156,7 +156,7 @@ mono_marshal_isinst_with_cache (MonoObject *obj, MonoClass *klass, uintptr_t *ca
 static void init_safe_handle (void);
 
 static void*
-ves_icall_marshal_alloc (gulong size);
+ves_icall_marshal_alloc (gsize size);
 
 void
 mono_string_utf8_to_builder (MonoStringBuilder *sb, char *text);
@@ -332,7 +332,7 @@ mono_marshal_init (void)
                register_icall (mono_ftnptr_to_delegate, "mono_ftnptr_to_delegate", "object ptr ptr", FALSE);
                register_icall (mono_marshal_asany, "mono_marshal_asany", "ptr object int32 int32", FALSE);
                register_icall (mono_marshal_free_asany, "mono_marshal_free_asany", "void object ptr int32 int32", FALSE);
-               register_icall (ves_icall_marshal_alloc, "ves_icall_marshal_alloc", "ptr int32", FALSE);
+               register_icall (ves_icall_marshal_alloc, "ves_icall_marshal_alloc", "ptr ptr", FALSE);
                register_icall (mono_marshal_free, "mono_marshal_free", "void ptr", FALSE);
                register_icall (mono_marshal_set_last_error, "mono_marshal_set_last_error", "void", FALSE);
                register_icall (mono_marshal_set_last_error_windows, "mono_marshal_set_last_error_windows", "void int32", FALSE);
@@ -10693,7 +10693,7 @@ mono_marshal_alloc (gulong size, MonoError *error)
 
 /* This is a JIT icall, it sets the pending exception and returns NULL on error. */
 static void*
-ves_icall_marshal_alloc (gulong size)
+ves_icall_marshal_alloc (gsize size)
 {
        MonoError error;
        void *ret = mono_marshal_alloc (size, &error);