[squeak-dev] FFI | Byte alignment

Marcel Taeumel marcel.taeumel at hpi.de
Fri May 29 13:52:51 UTC 2020


Hi, there.

In ExternalType class >> #initializeAtomicTypes, there is an interesting claim and a piece of dead code:

"On 32 bits Windows and MacOS, double and long have an alignment of 8. But on Linux, their alignment is 4"
(Smalltalk wordSize = 4 and: [Smalltalk platformName = 'unix']) ifTrue: [
(#('double longlong ulonglong') includes: typeName) ifTrue: [
byteAlignment := 4
]
].

As you can see, there are single quotes missing and so will the path "byteAlignment  := 4" never be reached.

I tried to figure out whether one should either fix the conditional or remove the entire passage. Maybe this got long fixed inside the FFI plugin?

Best,
Marcel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200529/c0ea3325/attachment.html>


More information about the Squeak-dev mailing list