On 11/22/09 2:44 PM, Mark Cave-Ayland wrote:
Thanks Laurent. Now I get it: the conversion routine in modules/client.c mistakenly put the CIF arguments into Forth the wrong way around using this piece of code:
for( i=pb->nargs-1; i>=0; i-- ) PUSH( pb->args[i] );
So, in other words: in order to fix this, we need to reverse the above loop so that the arguments are simply pushed onto the Forth stack in forward order, and then alter the Forth client interface words to take the new ordering into account. Then the CIF words can be called correctly from both Fcode and the C interface, and both our cases should work.
Nice finding... so our own work around to our own code made things break. Wonderful :-)
Stefan