2006-10-12 Zoltan Varga <vargaz@gmail.com>
+ * metadata.c (mono_type_size): Change the align parameter to guint32 for
+ consistency with the other _size functions.
+ (mono_type_stack_size): Ditto.
+
+ * class.c object.c icall.c: Fix warnings caused by the above change.
+
* class.c (mono_class_get_method_from_name_flags): Fix a typo.
* image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
for (pass = 0; pass < passes; ++pass) {
for (i = 0; i < top; i++){
- int size, align;
+ guint32 size, align;
field = &class->fields [i];
case TYPE_ATTRIBUTE_EXPLICIT_LAYOUT:
real_size = 0;
for (i = 0; i < top; i++) {
- int size, align;
+ guint32 size, align;
field = &class->fields [i];
* Compute static field layout and size
*/
for (i = 0; i < top; i++){
- int size, align;
+ guint32 size, align;
field = &class->fields [i];
} else if (!strcmp (m->name, "FieldSetter")) {
MonoClass *k = this->vtable->klass;
MonoString *name;
- int size, align;
+ guint32 size, align;
char *str;
/* If this is a proxy, then it must be a CBO */
if (start) {
iter->args = start;
} else {
- int i, align, arg_size;
+ guint32 i, align, arg_size;
iter->args = argsp + sizeof (gpointer);
#ifndef MONO_ARCH_REGPARMS
for (i = 0; i < iter->sig->sentinelpos; ++i) {
static MonoTypedRef
mono_ArgIterator_IntGetNextArg (MonoArgIterator *iter)
{
- gint i, align, arg_size;
+ guint32 i, align, arg_size;
MonoTypedRef res;
MONO_ARCH_SAVE_REGS;
static MonoTypedRef
mono_ArgIterator_IntGetNextArgT (MonoArgIterator *iter, MonoType *type)
{
- gint i, align, arg_size;
+ guint32 i, align, arg_size;
MonoTypedRef res;
MONO_ARCH_SAVE_REGS;
*
* Returns: the number of bytes required to hold an instance of this
* type in memory
- * FIXME: This should really use 'guint32*' for the align parameter.
*/
int
-mono_type_size (MonoType *t, gint *align)
+mono_type_size (MonoType *t, guint32 *align)
{
if (!t) {
*align = 1;
*
* Returns: the number of bytes required to hold an instance of this
* type on the runtime stack
- * FIXME: This should really use 'guint32*' for the align parameter.
*/
int
-mono_type_stack_size (MonoType *t, gint *align)
+mono_type_stack_size (MonoType *t, guint32 *align)
{
- int tmp;
+ guint32 tmp;
g_assert (t != NULL);
guint32 type_spec);
void mono_metadata_free_type (MonoType *type);
int mono_type_size (MonoType *type,
- int *alignment);
+ guint32 *alignment);
int mono_type_stack_size (MonoType *type,
- int *alignment);
+ guint32 *alignment);
gboolean mono_type_generic_inst_is_valuetype (MonoType *type);
gboolean mono_metadata_generic_class_is_valuetype (MonoGenericClass *gclass);
if (!(field->type->attrs & FIELD_ATTRIBUTE_LITERAL)) {
gint32 special_static = class->no_special_static_fields ? SPECIAL_STATIC_NONE : field_is_special_static (class, field);
if (special_static != SPECIAL_STATIC_NONE) {
- guint32 size, offset;
- int align;
+ guint32 size, offset, align;
size = mono_type_size (field->type, &align);
offset = mono_alloc_special_static_data (special_static, size, align);
if (!domain->special_static_fields)