Re: c_proc/func() bug ?
- Posted by "Daniel Kluss" <codepilot at netzero.net> Nov 11, 2003
- 605 views
----- Original Message ----- From: "mic _" <stabmaster_ at hotmail.com> To: <EUforum at topica.com> Subject: c_proc/func() bug ? > > > I was playing around with the new ability to use define_c_proc/func and > c_proc/func with machine code functions. What puzzled me a bit was the order > in which arguments are pushed. > > Assume the following: > > foo = define_c_func("", function_pointer, {C_INT,C_INT,C_INT}, C_INT) > result = c_func(foo, {1, 2, 3}) > > Since this uses stdcall, the stack should look like this when the function > is called: > > esp+0: return address > esp+4: 3 > esp+8: 2 > esp+12: 1 > > But what i got was this: > > esp+0: return address > esp+4: 1 > esp+8: 2 > esp+12: 3 > > What gives? > > > > TOPICA - Start your own email discussion group. FREE! > >