[Pharo-project] FFI number of arguments

Igor Stasenko siguctua at gmail.com
Tue Oct 5 22:07:56 EDT 2010

On 6 October 2010 04:52, Schwab,Wilhelm K <bschwab at anest.ufl.edu> wrote:
> Hello all,
> I have been bumping into some functions with large numbers of arguments.  One in particular would be best handled in the image if at all possible.  The following might be the answer:
>   http://thread.gmane.org/gmane.comp.lang.smalltalk.squeak.general/98538/focus=98543
> Have any of you done this with >15 (or whatever the cutoff is) arguments?

what i can say.. put a feature request for NativeBoost to fetch
arguments from array.. :)

i imagine something like that:

callFooX: x y: y rest: array

    <primitive: #primitiveNativeCall module: #NativeBoostPlugin >

    ^ NBFFICallout cdecl: #(
         int foo (int x, int y , char array (1) , void* array(2) )
   module: 'bar.dll'

so, array(i)
tells code generator that argument should be fetched from array
argument at index 1.
There could be variants like:

int foo (int x, int y , char array 1 , void* array 2 )

> Bill
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Best regards,
Igor Stasenko AKA sig.

More information about the Pharo-dev mailing list