[squeak-dev] FFI: FFI-Kernel-mt.196.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Aug 11 13:02:54 UTC 2021

Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:

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

Name: FFI-Kernel-mt.196
Author: mt
Time: 11 August 2021, 3:02:53.347512 pm
UUID: 37191bbe-a245-3148-9f90-4177f4421535
Ancestors: FFI-Kernel-mt.195

Fixes a remaining issue with ExternalType class >> #initialize. Callback tests did not pass after that. Now they do.

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

Item was changed:
  ----- Method: ExternalPointerType>>invalidate (in category 'private') -----
+ 	"We can directly initialize this type again. Unfortunately, we need special treatment for pointers to arrays-of-atomics to make coercion work. This can be improved once array types are encoded in the #headerWord."
- 	"We can directly initialize this type again."
+ 	(self asNonPointerType isArrayType and: [self asNonPointerType isTypeAlias not])
- 	self asNonPointerType isArrayType
  		ifTrue: [
  			self flag: #pointerToArray.
  			compiledSpec := (WordArray with: (self class pointerSpec bitOr: FFIFlagAtomic "HACK!! To deceive the FFI plugin :)")).
+ 			byteAlignment := self class pointerAlignment]
- 			byteAlignment := self class pointerAlignment
- 			]
  		ifFalse: [
+ 			"Note that #initializeAtomicTypes will also update this because the current FFI plugin treats pointers to atomics as something special."
  			compiledSpec := WordArray with: self class pointerSpec.
  			byteAlignment := self class pointerAlignment].!

More information about the Squeak-dev mailing list