[Pkg] FFI: FFI-Kernel-mt.145.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 14 14:18:32 UTC 2021


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

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

Name: FFI-Kernel-mt.145
Author: mt
Time: 14 May 2021, 4:18:31.545022 pm
UUID: 0bda75fa-1b6d-0c48-ad46-be932ab91311
Ancestors: FFI-Kernel-mt.144

Make it easy to switch an array's content type without loosing its size information.

Fixes recompilation of all affected methods by also checking the #callback: pragma. (See FFI-Callbacks)

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

Item was added:
+ ----- Method: ExternalData>>setContentType: (in category 'private') -----
+ setContentType: externalType
+ 
+ 	self setType: (externalType asArrayType: self size).!

Item was changed:
  ----- Method: ExternalType class>>recompileAllLibraryFunctions (in category 'housekeeping') -----
  recompileAllLibraryFunctions
  	"Recompile all methods that do FFI calls (e.g. <apicall ... > or <cdecl ... >) to update all mappings from type name to atomic type and struct type. Note that unknown struct types will be created on-the-fly and can later be completed by defining fields in the particular structure class via #defineFields or #compileFields. Note that such a recompilation is especially useful if 'type constants' for atomic types to additional dispatch such as according to the current platform's #wordSize."
  
  	SystemNavigation default allSelectorsAndMethodsDo: [:behavior :selector :method |
+ 		(method externalLibraryFunction notNil
+ 			or: [method hasPragma: #callback:])
+ 				ifTrue: [behavior recompile: selector]].!
- 		method externalLibraryFunction ifNotNil: [behavior recompile: selector]].!



More information about the Packages mailing list