> Well, that's what you get for using globals Please do take a look at the issue at hand before pointing fingers. First, GetLastError() isn't a really a global (and neither is errno); they are both thread-local. Next, there is really no choice to use or not use errno - if you want to find out what the error is that has occurred, you *have* to look at errno. Finally, in the case of Py_END_ALLOW_THREADS, errno/GetLastError is typically read right after the system call. However, you can't raise the Python exception before Py_END_ALLOW_THREADS (which you seem to suggest as a solution), since we must not call Python APIs without holding the GIL.
> Generally, I would discourage non-local errno use. My motivation is that MS > Windows CE simply doesn't have errno and MS Windows in general often uses > different ways to signal errors, so not using it would restrict the > conditionally compiled code further. That sounds like an unrelated issue to the one at hand. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com