FFI and apicall/cdecl type

mathieu mathk.sue at gmail.com
Wed Jul 19 06:24:09 UTC 2006


Andreas Raab a écrit :
> Since this is the second time you're posting a question in this area
> (which makes me assume that you're actually interested in getting an
> answer) I'll point you gently to:
> 
>   http://linuxmafia.com/faq/Essays/smart-questions.html
> 
> Please read it and note in particular the parts about "Be precise and
> informative about your problem" and "Be explicit about your question".

ok sorry.

So what the ExternalType served for?

I don't understand why you have to ask in 2 different way the
ExternalType (xType := descriptorClass atomicTypeNamed: here and xType
:= descriptorClass structTypeNamed: sym)?

What the mssage #hasInterned:ifTrue: served for in this case?


> Cheers,
>   - Andreas
> 
> mathieu wrote:
>> Hi,
>>
>> I was wondering how the type was handle when apicall or cdecl occur.
>> I have read how it is parse by the compiler and don't understand the
>> following:
>>
>> ======================================
>> Parser>>externalType: descriptorClass
>>     "Parse an return an external type"
>>     | xType |
>>     xType _ descriptorClass atomicTypeNamed: here.
>>     xType == nil ifTrue:["Look up from class scope"
>> *here*        Symbol hasInterned: here ifTrue:[:sym|
>> *here*            xType _ descriptorClass structTypeNamed: sym]].
>>     xType == nil ifTrue:[
>>         "Raise an error if user is there"
>> *here*        self interactive ifTrue:[^nil].
>>         "otherwise go over it silently"
>> *here*        xType _ descriptorClass forceTypeNamed: here].
>>     self advance.
>>     (self matchToken:#*)
>>         ifTrue:[^xType asPointerType]
>>         ifFalse:[^xType]
>> =============================================
>>
>> So if somebody can explain it to me thanks :)
>>
>> Math
>>
>>
> 
> 
> 




More information about the Squeak-dev mailing list