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

commits at source.squeak.org commits at source.squeak.org
Mon Dec 13 13:46:46 UTC 2021


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

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

Name: FFI-Kernel-mt.222
Author: mt
Time: 13 December 2021, 2:46:45.081673 pm
UUID: 16a2a043-c780-244a-8442-f853916ba80d
Ancestors: FFI-Kernel-mt.221

Fixes initialization issue/regression of char types' array classes.

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

Item was changed:
  ----- Method: ExternalType class>>initializeArrayClasses (in category 'class initialization') -----
  initializeArrayClasses
  	"
  	ExternalType initializeArrayClasses.
  	"
  	RawBitsArray allSubclasses collect: [:arrayClass |
  		(arrayClass includesSelector: #contentType) ifTrue: [
  		[arrayClass new contentType setArrayClass: arrayClass]
  			on: Error do: [ "Ignore." ]]].
  
  	String allSubclasses collect: [:stringClass | | contentType |
  		[ contentType := stringClass new contentType.
+ 		contentType setArrayClass: stringClass ]
- 		contentType asUnsigned setArrayClass: stringClass.
- 		contentType asSigned setArrayClass: stringClass ]
  			on: Error do: [ "Ignore."]].!

Item was changed:
  ----- Method: ExternalType>>isCharType (in category 'testing - integer / char') -----
  isCharType
  	"Return true if the receiver is a built-in character type. Note that we want to avoid hard-coding type codes and invariants around type codes here to remain compatible with different plugin versions."
  
  	| type |
  	type := self atomicType.
  	type = FFITypeUnsignedChar8 ifTrue: [^ true].
+ 	type = FFITypeSignedChar8 ifTrue: [^ true]. "Not needed anymore. See #atomicTypeSpecs"
- 	type = FFITypeSignedChar8 ifTrue: [^ true].
  	type = FFITypeUnsignedChar16 ifTrue: [^ true].
  	type = FFITypeUnsignedChar32 ifTrue: [^ true].
  	^ false!



More information about the Squeak-dev mailing list