Marcel Taeumel uploaded a new version of FFI-Pools to project FFI:
http://source.squeak.org/FFI/FFI-Pools-mt.23.mcz==================== Summary ====================
Name: FFI-Pools-mt.23
Author: mt
Time: 12 June 2020, 4:12:31.231744 pm
UUID: 6438a62d-b9fe-da46-9a0b-ae178c90edff
Ancestors: FFI-Pools-mt.22
Make conversion of Squeak FFI atomic types to C type names accessible to FFI-Tools package.
=============== Diff against FFI-Pools-mt.22 ===============
Item was added:
+ ----- Method: ExternalPoolReadWriter class>>cFormatPlaceholderFor: (in category 'code generation') -----
+ cFormatPlaceholderFor: externalType
+
+ AtomicCFormatPlaceholders ifNil: [self class initializeAtomicTypesExtra].
+
+ ^ externalType isPointerType
+ ifTrue: ['%p']
+ ifFalse: [
+ AtomicCFormatPlaceholders
+ at: externalType atomicType
+ ifAbsent: [nil]]!
Item was added:
+ ----- Method: ExternalPoolReadWriter class>>cTypeNameFor: (in category 'code generation') -----
+ cTypeNameFor: externalType
+
+ | cTypeName |
+ AtomicCTypeNames ifNil: [self class initializeAtomicTypesExtra].
+
+ cTypeName := AtomicCTypeNames
+ at: externalType atomicType
+ ifAbsent: [nil].
+
+ ^ externalType isPointerType
+ ifTrue: [cTypeName, ' *']
+ ifFalse: [cTypeName]!
Item was changed:
----- Method: ExternalPoolReadWriter>>cFormatPlaceholderFor: (in category 'writing - support') -----
cFormatPlaceholderFor: externalType
- "Limit access to printf format placeholders to instances of pool read-writers only."
+ ^ self class cFormatPlaceholderFor: externalType!
- AtomicCFormatPlaceholders ifNil: [self class initializeAtomicTypesExtra].
-
- ^ externalType isPointerType
- ifTrue: ['%p']
- ifFalse: [
- AtomicCFormatPlaceholders
- at: externalType atomicType
- ifAbsent: [nil]]!
Item was changed:
----- Method: ExternalPoolReadWriter>>cTypeNameFor: (in category 'writing - support') -----
cTypeNameFor: externalType
- "Limit access to C type names to instances of pool read-writers only."
+ ^ self class cTypeNameFor: externalType!
- | cTypeName |
- AtomicCTypeNames ifNil: [self class initializeAtomicTypesExtra].
-
- cTypeName := AtomicCTypeNames
- at: externalType atomicType
- ifAbsent: [nil].
-
- ^ externalType isPointerType
- ifTrue: [cTypeName, ' *']
- ifFalse: [cTypeName]!