[squeak-dev] FFI: FFI-Tests-mt.59.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Aug 12 11:50:05 UTC 2021
Marcel Taeumel uploaded a new version of FFI-Tests to project FFI:
http://source.squeak.org/FFI/FFI-Tests-mt.59.mcz
==================== Summary ====================
Name: FFI-Tests-mt.59
Author: mt
Time: 12 August 2021, 1:50:04.867908 pm
UUID: 2a0cb345-47c3-1c4b-9bd3-c008f3ad0a0a
Ancestors: FFI-Tests-mt.58
Complements FFI-Kernel-mt.199
=============== Diff against FFI-Tests-mt.58 ===============
Item was added:
+ ----- Method: FFIAllocateTests>>test22ArrayForVoidPointers (in category 'tests - array') -----
+ test22ArrayForVoidPointers
+ "Use a single external object to avoid #isNull check."
+
+ | type array object |
+ type := ExternalType void asPointerType.
+ array := self allocate: type size: 1.
+
+ object := (externalObjects add: FFITestPoint2 allocateExternal).
+ array at: 1 put: object getHandle. "Write address, discard type."
+
+ self deny: array isNull.
+ self deny: array first isNull.
+
+ self assert: array byteSize isNil. "Unknown because of void* content"
+ self assert: array first byteSize isNil. "Unknown because of void content"!
More information about the Squeak-dev
mailing list
|