[Python-Dev] Assign to errno allowed? (original) (raw)

Thomas Heller thomas.heller@ion-tof.com
Tue, 24 Sep 2002 15:24:41 +0200


I'm trying to fix selectmodule.c on Windows (it raises bogus exceptions, because select() on Windows does not set errno). The first patch I had was this:

if (n < 0) {

but PyErr_SetExcFromWindowsErr is not present in the 2.2 maintainance branch. An easier fix would be this one, but I wonder if it is allowed/good style to set 'errno':

*** 274,279 **** --- 274,282 ---- Py_END_ALLOW_THREADS

if (n < 0) {

Thomas