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

Eliot Miranda eliot.miranda at gmail.com
Tue May 19 19:59:36 UTC 2020


Hi Marcel,

   re FFI-Kernel-mt.69, why not

externalLibraryFunction
"Answers the external library function that will be called when evaluating
this method."

| result |
^self numLiterals > 0 ifTrue:
[(result := self literalAt: 1) class == ExternalLibraryFunction ifTrue:
[result]]

It's so much more elegant than all those explicit [nil]'s.  We should know
that ifTrue: et al answer nil when their block is not evaluated.

On Tue, May 19, 2020 at 7:18 AM <commits at source.squeak.org> wrote:

> Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
> http://source.squeak.org/FFI/FFI-Kernel-mt.70.mcz
>
> ==================== Summary ====================
>
> Name: FFI-Kernel-mt.70
> Author: mt
> Time: 19 May 2020, 4:18:35.480992 pm
> UUID: 77eeead7-5f0d-6c4c-99c1-fc879d8c79e6
> Ancestors: FFI-Kernel-mt.69
>
> Print the type for external data in tools so one can quickly recognize
> 'char*' etc.
>
> =============== Diff against FFI-Kernel-mt.69 ===============
>
> Item was added:
> + ----- Method: ExternalData>>printOn: (in category 'printing') -----
> + printOn: stream
> +
> +       super printOn: stream.
> +
> +       stream
> +               nextPut: $<;
> +               print: type;
> +               nextPut: $>.!
>
>
>

-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200519/dc6527f4/attachment.html>


More information about the Squeak-dev mailing list