2010/5/20 Sean P. DeNigris <[email protected]>: > > <apicall: long 'system' (char*) module: 'libSystem.dylib'> > Function specification > - should be the first line > - enclosed in angle brackets: < > containing: > 1. Calling Convention, either apicall: (Pascal > convention) or cdecl: (C > convention) > - Mac - use either one > - Unix - use cdecl > - Windows - use apical
In Windows the cdecl calling convention may be used when you want your code interfacing the external library to be portable to other platforms. > Questions: > * why would you want to build the FFI plugin yourself? To provide better failure handlers. Most of the time writing an interface is lost decoding the type of failure description when calling external functions, specially the conversion of types from Smalltalk to C (coercion). > * why would a field description have three elements? I think this is the case when you have in C char myArray [8] then you would write in the fields description: (myArray 'char' 8) Cheers, Hernán _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
