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

commits at source.squeak.org commits at source.squeak.org
Sat May 22 13:19:44 UTC 2021

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

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

Name: FFI-Kernel-mt.166
Author: mt
Time: 22 May 2021, 3:19:41.704855 pm
UUID: cecd9ff4-64c2-2343-a278-d7263d721b90
Ancestors: FFI-Kernel-mt.165

Some bug fixes around void and void*

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

Item was changed:
  ----- Method: ExternalData>>arrayType (in category 'accessing - types') -----
+ 	"Answer this container's array type or 'nil' if unknown. Supports"
- 	"Answer this container's array type or 'nil' if unknown."
  	| arrayType |
+ 	^ (arrayType := self containerType) asNonPointerType isVoid
- 	^ (arrayType := self containerType) isVoid
  		ifFalse: [arrayType]!

Item was changed:
  ----- Method: ExternalData>>setType: (in category 'private') -----
  setType: externalType
  	"Private. Set the type used to derive content and container types. If you want to change the content type later, use #setContentType:."
  	externalType = ExternalType string ifTrue: [
  		^ self setType: externalType asNonPointerType].
+ 	externalType isVoid ifTrue: [
+ 		^ self setType: externalType asPointerType].
+ 	(externalType isArrayType or: [externalType asNonPointerType isVoid])
+ 		ifTrue: [type := externalType "array type or void*"]
- 	(externalType isArrayType or: [externalType isVoid])
- 		ifTrue: [type := externalType]
  		ifFalse: [type := (externalType asArrayType: nil)].
  	contentType := nil.!

Item was changed:
  ----- Method: ExternalData>>writer (in category 'accessing') -----
  	"Overwritten to preserve type."
+ 	^ (self isNull or: [handle isExternalAddress])
- 	^ handle isExternalAddress
  		ifTrue: [self]
  		ifFalse: [self class fromHandle: (ByteArrayReadWriter on: handle) type: type]!

Item was added:
+ ----- Method: VoidReadWriteSend>>handle:atIndex: (in category 'evaluating') -----
+ handle: handle atIndex: byteOffset
+ 	"no accessors for void"
+ 	self shouldNotImplement.!

Item was added:
+ ----- Method: VoidReadWriteSend>>handle:atIndex:put: (in category 'evaluating') -----
+ handle: handle atIndex: byteOffset put: value
+ 	"no accessors for void"
+ 	self shouldNotImplement.!

More information about the Squeak-dev mailing list