#include <string.h>
#include <errno.h>
+#if defined(HOST_WIN32)
+#include <objbase.h>
+#endif
+
/* #define DEBUG_RUNTIME_CODE */
#define OPDEF(a,b,c,d,e,f,g,h,i,j) \
#else
res = g_try_malloc ((gulong)size);
if (!res)
- mono_error_set_out_of_memory (error, "Could not allocate %i bytes", size);
+ mono_error_set_out_of_memory (error, "Could not allocate %lu bytes", size);
#endif
return res;
}
GHashTable *method_aux_hash;
GHashTable *vararg_aux_hash;
MonoGHashTable *generic_def_objects;
- MonoGHashTable *methodspec;
/*
* Maps final token values to the object they describe.
*/
mono_image_strdup_vprintf (MonoImage *image, const char *format, va_list args);
char*
- mono_image_strdup_printf (MonoImage *image, const char *format, ...);
+ mono_image_strdup_printf (MonoImage *image, const char *format, ...) MONO_ATTR_FORMAT_PRINTF(2,3);;
GList*
g_list_prepend_image (MonoImage *image, GList *list, gpointer data);
*pass_size_in_words = FALSE;
- if (mono_class_has_finalizer (vtable->klass) || mono_class_is_marshalbyref (vtable->klass) || (mono_profiler_get_events () & MONO_PROFILE_ALLOCATIONS))
+ if (mono_class_has_finalizer (vtable->klass) || mono_class_is_marshalbyref (vtable->klass))
return ves_icall_object_new_specific;
if (vtable->gc_descr != MONO_GC_DESCRIPTOR_NULL) {
o = (MonoObject *)mono_gc_alloc_vector (vtable, byte_len, len);
if (G_UNLIKELY (!o)) {
- mono_error_set_out_of_memory (error, "Could not allocate %i bytes", byte_len);
+ mono_error_set_out_of_memory (error, "Could not allocate %zd bytes", (gsize) byte_len);
return NULL;
}
o = (MonoObject *)mono_gc_alloc_vector (vtable, byte_len, n);
if (G_UNLIKELY (!o)) {
- mono_error_set_out_of_memory (error, "Could not allocate %i bytes", byte_len);
+ mono_error_set_out_of_memory (error, "Could not allocate %zd bytes", (gsize) byte_len);
return NULL;
}
s = (MonoString *)mono_gc_alloc_string (vtable, size, len);
if (G_UNLIKELY (!s)) {
- mono_error_set_out_of_memory (error, "Could not allocate %i bytes", size);
+ mono_error_set_out_of_memory (error, "Could not allocate %zd bytes", size);
return NULL;
}
#define MONO_ATTR_USED
#endif
+ #ifdef __GNUC__
+ #define MONO_ATTR_FORMAT_PRINTF(fmt_pos,arg_pos) __attribute__((format(printf,fmt_pos,arg_pos)))
+ #else
+ #define MONO_ATTR_FORMAT_PRINTF(fmt_pos,arg_pos)
+ #endif
+
#ifdef HAVE_KW_THREAD
#define MONO_HAVE_FAST_TLS
#define MONO_LLVM_INTERNAL
#endif
-#if HAVE_DEPRECATED
-#define MONO_DEPRECATED __attribute__ ((deprecated))
-#else
-#define MONO_DEPRECATED
-#endif
-
#ifdef __GNUC__
#define MONO_ALWAYS_INLINE __attribute__((always_inline))
#elif defined(_MSC_VER)