[Pharo-users] FFIExternalType hooks; naming convention

eftomi tomaz.turk at ef.uni-lj.si
Sat Sep 21 07:18:15 EDT 2019


I have a couple of questions regarding FFI:

- If you want to create a new FFIExternalType subclass, which are the
necessary hooks that should be implemented - like #externalType,
#externalTypeSize … on the class side and #basicHandle:at:,
#basicHandle:at:put:, #stackValueParameterClass, etc. on the instance side?

- Is there anything else that should be done besides hooks - for instance
another "entries" into FFIConstants class>>#initializeTypeConstants or even
ExternalType>>#initializeAtomicTypes ?

- About naming standards: the ExternalData class has some methods that
"grab" strings from the heap, like ExternalData>>#fromCString and
ExternalData>>#readStringUTF8 - these two methods do the heavy work, however
the method ExternalData>>#readString more or less just refers to
ExternalData>>#fromCString. Is there any difference between "from..." and


Best wishes,

Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

More information about the Pharo-users mailing list