FFI: FFI-Kernel-mt.177.mcz

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

FFI: FFI-Kernel-mt.177.mcz

commits-2
Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-mt.177.mcz

==================== Summary ====================

Name: FFI-Kernel-mt.177
Author: mt
Time: 27 May 2021, 2:26:09.621609 pm
UUID: 4cb498da-9e06-9343-943b-bcb208915b9c
Ancestors: FFI-Kernel-mt.176

Adds #pointer alias to quickly get a pointer type.
Adds type lookup for various type representations such as string, symbol, or struct class.

=============== Diff against FFI-Kernel-mt.176 ===============

Item was added:
+ ----- Method: ExternalType class>>lookupType: (in category 'instance lookup') -----
+ lookupType: structClassOrTypeNameOrType
+ "Answers a type from the given spec, which can be a name, a struct class, or an actual type. Approximate being a struct class via #isBehavior."
+
+ ^ structClassOrTypeNameOrType isString
+ ifTrue: [self typeNamed: structClassOrTypeNameOrType]
+ ifFalse: [structClassOrTypeNameOrType isBehavior
+ ifTrue: [structClassOrTypeNameOrType externalType]
+ ifFalse: [structClassOrTypeNameOrType]]!

Item was added:
+ ----- Method: ExternalType class>>pointer (in category 'type constants - extra') -----
+ pointer
+ "Answers a generic pointer type, that is, void*"
+
+ ^ ExternalType void asPointerType!