[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 2783b4: [SqueakSSL][overlay] fix "null function"
GitHub
noreply at github.com
Mon Mar 12 20:04:30 UTC 2018
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 2783b44298b63027f43bf70646b776e1e4a0384d
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2783b44298b63027f43bf70646b776e1e4a0384d
Author: Tobias Pape <tobias at netshed.de>
Date: 2018-03-12 (Mon, 12 Mar 2018)
Changed paths:
M platforms/unix/plugins/SqueakSSL/openssl_overlay.h
Log Message:
-----------
[SqueakSSL][overlay] fix "null function"
we define all functions not availiable at link time (because we know
what is available in which openssl release) as "null function", i.e., a
function pointer that will pass as "false" in an `if (func) { ... }`
construct.
Deconstruction:
```C
((void*(*)())NULL)
```
- `NULL` is the part that evaluates to "not true" in the expression to
the if
- `(*)` makes it a function pointer
- `void*` returning anything (most importantly, something assignable to
anything)
- `()` not specifiying what kind of arguments will come in.
All this should be standard-compliant
More information about the Vm-dev
mailing list