On Sat, 2005-10-22 at 21:48 +0200, Nicolas Cannasse wrote:

> Will do that later.
> I'll try to have one unique file for them VM since I also one unique for the
> API.

Makes sense.

> > Uncaught exception - load.c(426) : Invalid module : Nekoml/Main
> 
> I just fixed most of the warnings (except the main.c one : any suggestion
> ?).

        p.args = (char const**)argv + 1;

just a constness thing I guess: argv should really be 
'const char **argv' but isn't for historical reasons.

> This error must be some problem with read_long function on 64bit.
> Should be easy to fix. Can you do some print/debug in order to give me more
> informations ?

(Aside: in:

static value default_loadmodule( value mname, value this ) {

please don't use 'this' as an identifier, its a C++ keyword)

Anyhow do these numbers work?

static void read_long( reader r, readp p, int_val *i ) {
        unsigned char c[4];
        int n;
  printf("sizeof(value)=%d\n",sizeof(value));
  printf("sizeof(int_val)=%d\n",sizeof(int_val));
  printf("sizeof(int)=%d\n",sizeof(int));
  printf("sizeof(val_type)=%d\n",sizeof(val_type));
  printf("sizeof(struct _value)=%d\n",sizeof(struct _value));

        r(p,c,4);
        n = c[0] | (c[1] << 8) | (c[2] << 16) | (c[3] << 24);
        *i = LONG_TO_LE(n);
}

(cd src && LD_LIBRARY_PATH=../bin NEKOPATH=../boot ../bin/nekovm
Nekoml/Main Neko/Main.nml Nekoml/Main.nml)
sizeof(value)=8
sizeof(int_val)=8
sizeof(int)=4
sizeof(val_type)=4
sizeof(struct _value)=4
Uncaught exception - load.c(431) : Invalid module : Nekoml/Main



-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

---
Neko : One VM to run them all

Reply via email to