Hi Slava,

> I merged your changes in but the tests fail on platforms that your
> code doesn't support. Could you please add the right code for the
> *BSDs and Windows?

I'll give it a go. I'll have to install both in VMs in order to test, so
it wont be immediate.

I've pushed some more fixes to [email protected]:jedahu/factor.git inlinec
branch.

69755b37ebbf23be1d3d28bd3721aa8c4b884934 alien.inline: added annotate-effect 
word
2b162e4ce86936acaf59fc70ee054daa86708ab0 alien.inline: refactoring
fc44da28d0458c4d6d4977323068f8fb25b7a6b2 alien.inline: prototype-string: fixed 
params
96534a5d95c53f9484a31c73d48efde9d6c398df alien.inline: cify-type: fixed 
incorrect substitution
1e7ab018e9595e6176e58924c5f26ca0c3c9d605 alien.inline: 
types->effect>params-return: fix for stack order and void return type
1649f811f4266830eb4a884b27a279802be883a3 alien.inline: function-types-effect: 
fixed incorrect stack order
9ee25d61486e9c1b23e0e1b879ebcb5b0354db87 alien.inline: factorize-type covers 
unsigned and long
96bbef8a6f989771a5817492eb98c95fd3cc70c4 alien.inline: added define-c-function' 
and refactored existing words

There is now also a marshall branch. Use C-MARSHALL: instead of
C-FUNCTION: and args and return values will be automatically marshalled
by the generated word. Output arguments (non-const pointers to
primitives) are unmarshalled and pushed on the stack after the return
value proper.

It's just occurred to me that while C-MARSHALL: is analogous to
C-FUNCTION: in that it generates C source and a factor word, I have not
written a marshalling analogue to FUNCTION:. I'll have to factor one
out.

alien.marshall defines an alien-wrapper tuple and the unmarshalling code
wraps non-primitive pointers in an instance of this type. A dynamic-cast
method is supplied for cases like Qt, where a) the returned object may
be a subclass of the declared return type, and b) it is possible to
determine at runtime what the subclass is, and cast to it.

Jeremy

------------------------------------------------------------------------------
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to