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

commits at source.squeak.org commits at source.squeak.org
Thu Jun 18 12:45:16 UTC 2020


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

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

Name: FFI-Kernel-mt.113
Author: mt
Time: 18 June 2020, 2:40:14.824118 pm
UUID: 556bf79d-15a2-f340-9586-a0333f091288
Ancestors: FFI-Kernel-mt.112

Avoid copying external structs that are part of other structs from external memory into object memory.

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

Item was added:
+ ----- Method: ExternalAddress>>structAt:length: (in category 'accessing') -----
+ structAt: byteOffset length: length
+ 	"Return the external address of the struct's first field. Ignore length."
+ 	^ self + byteOffset!

Item was added:
+ ----- Method: ExternalAddress>>structAt:put:length: (in category 'accessing') -----
+ structAt: byteOffset put: externalAddress length: length
+ 	"Read length bytes from externalAddress and write it at this external address (plus byteOffset)."
+ 	
+ 	| start |
+ 	start := self + byteOffset.
+ 	1 to: length do: [:targetOffset |
+ 		start
+ 			byteAt: targetOffset
+ 			put: (externalAddress byteAt: targetOffset)].!



More information about the Squeak-dev mailing list