Apicall and cdecl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Apicall and cdecl

Mathieu SUEN
Hi,

I was wondering how do apicall and cdecl are parse.
I read the Parser>>#externalFunctionDeclaration and saw:

Smalltalk at: #ExternalLibraryFunction ifPresent:[:xfn|
                fn _ xfn name: externalName
                                module: module
                                callType: callType
                                returnType: retType
                                argumentTypes: args contents.
                self allocateLiteral: fn.
        ]

So do anyone can told me what it's for?

Thank in advence.

Math

Reply | Threaded
Open this post in threaded view
|

Re: Apicall and cdecl

Bert Freudenberg-3

Am 16.07.2006 um 19:44 schrieb mathieu:

> Hi,
>
> I was wondering how do apicall and cdecl are parse.
> I read the Parser>>#externalFunctionDeclaration and saw:
>
> Smalltalk at: #ExternalLibraryFunction ifPresent:[:xfn|
> fn _ xfn name: externalName
> module: module
> callType: callType
> returnType: retType
> argumentTypes: args contents.
> self allocateLiteral: fn.
> ]
>
> So do anyone can told me what it's for?

That's an FFI declaration for directly calling an external function  
in some C library. It's similar to a primitive call so it shares its  
syntax with angle brackets.

- Bert -