If I may make a guess, a bool has a size of 1, and the three Boolean values are being aligned to four bytes.

 

Have a nice day J

Jim Bellinger

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Ferguson, Neale
Sent: Tuesday, October 01, 2002 10:20 PM
To: Monolist (E-mail)
Subject: [Mono-list] pinvoke4

 

In pinvoke4.cs simplestruct is defined as:

 

        public struct SimpleStruct {
                public bool a;
                public bool b;
                public bool c;
                public string d;
        }

In libtest.c simplestruct is defined as:

 

typedef struct {
        int a;
        int b;
        int c;
        char *d;
} simplestruct

 

However, when mono_create_trampoline the size of the returned by: mono_class_value_size (sig->ret->data.klass, NULL) is 8. Why is it not 16? I guess the answer is it should be 16 but I'm doing something stupid.

Neale Ferguson

Reply via email to