--- a/ExternalLibraryFunction.st Wed Jun 08 14:07:35 2016 +0100
+++ b/ExternalLibraryFunction.st Thu Jun 09 01:47:28 2016 +0100
@@ -144,14 +144,14 @@
A limited fallback implementation is provided for systems with no libffi.
(this may have limitations on the supported argument types; for example,
the x86_64 fallback does not support float/double arguments).
- Therefore the fallback should be considered a temporary workaround,
+ Therefore the fallback should be considered a temporary workaround,
until libffi has been ported.
-
+
Inside a method, when a special external-call pragma such as:
- <api: bool MessageBeep(uint)>
+ <api: bool MessageBeep(uint)>
is encountered by the parser, the compiler generates a call via
- <correspondingExternalLibraryFunctionObject> invokeWithArguments: argumentArray.
+ <correspondingExternalLibraryFunctionObject> invokeWithArguments: argumentArray.
and the correspondingExternalLibraryFunctionObject is kept in the literal array.
In the invoke method, the library is checked to be loaded (and loaded if not already),
@@ -159,22 +159,22 @@
and finally, the return value is converted back from C to a smalltalk object.
The parser supports the call-syntax of various other smalltalk dialects:
- Squeak / ST-X:
- <cdecl: [async] [virtual|nonVirtual][const] returnType functionNameStringOrIndex ( argType1..argTypeN ) module: moduleName >
- <apicall: [async] [virtual|nonVirtual][const] returnType functionNameStringOrIndex ( argType1..argTypeN ) module: moduleName >
+ Squeak / ST-X:
+ <cdecl: [async] [virtual|nonVirtual][const] returnType functionNameStringOrIndex ( argType1..argTypeN ) module: moduleName >
+ <apicall: [async] [virtual|nonVirtual][const] returnType functionNameStringOrIndex ( argType1..argTypeN ) module: moduleName >
- Dolphin:
- <stdcall: [virtual|nonVirtual][const] returnType functionNameStringOrIndex argType1..argTypeN>
- <cdecl: [virtual|nonVirtual][const] returnType functionNameStringOrIndex argType1..argTypeN>
+ Dolphin:
+ <stdcall: [virtual|nonVirtual][const] returnType functionNameStringOrIndex argType1..argTypeN>
+ <cdecl: [virtual|nonVirtual][const] returnType functionNameStringOrIndex argType1..argTypeN>
- ST/V:
- <api: functionName argType1 .. argTypeN returnType>
- <ccall: functionName argType1 .. argTypeN returnType>
- <ole: vFunctionIndex argType1 .. argTypeN returnType>
+ ST/V:
+ <api: functionName argType1 .. argTypeN returnType>
+ <ccall: functionName argType1 .. argTypeN returnType>
+ <ole: vFunctionIndex argType1 .. argTypeN returnType>
- VisualWorks:
- <c: ...>
- <c: #define NAME value>
+ VisualWorks:
+ <c: ...>
+ <c: #define NAME value>
"
!