4 ms·
The problem with `getlasterror` and `errno` is that they're global (thread-local, whatever). But if you make them take a `context` object, there's no longer a
by o11c 1y ago
The problem with `getlasterror` and `errno` is that they're global (thread-local, whatever).
But if you make them take a `context` object, there's no longer a problem.
One interesting observation - you can use them even for the initial "failed to allocate a context" by interpreting a NULL pointer as always containing an "out of memory" error.