Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-mt.77.mcz==================== Summary ====================
Name: FFI-Kernel-mt.77
Author: mt
Time: 27 May 2020, 3:01:22.394043 pm
UUID: e182b78a-b899-7c4c-afd8-ad1642c7c800
Ancestors: FFI-Kernel-mt.76
Since ExternalAddress makes extensive use of #wordSize, avoid spreading FFIPlatformDescription but re-introduce the message #wordSize instead.
...I hope this has no implications on performance in general, because wordSize was a class-side instVar in ExternalAddress before.
=============== Diff against FFI-Kernel-mt.76 ===============
Item was changed:
----- Method: ExternalAddress class>>allBeNullAndResize (in category 'system startup') -----
allBeNullAndResize
"Null all instances by becomming to new (and hence null) pointers of the platform's current word size."
| instances wordSize |
instances := self allInstances.
+ wordSize := self wordSize.
- wordSize := FFIPlatformDescription current wordSize.
instances elementsForwardIdentityTo:
(instances collect: [:address | self basicNew: wordSize]).!
Item was changed:
----- Method: ExternalAddress class>>new (in category 'instance creation') -----
new
"External addresses are either four or eight bytes long."
+ ^super new: self wordSize!
- ^super new: FFIPlatformDescription current wordSize!
Item was changed:
----- Method: ExternalAddress class>>new: (in category 'instance creation') -----
new: n
"Only create ExternalAddresses of the right size."
+ ^n = self wordSize
- ^n = FFIPlatformDescription current wordSize
ifTrue: [super new: n]
ifFalse: [self shouldNotImplement]!
Item was added:
+ ----- Method: ExternalAddress class>>wordSize (in category 'constants') -----
+ wordSize
+
+ ^ FFIPlatformDescription current wordSize!