[Python-Dev] Assign to errno allowed?

Guido van Rossum guido@python.org
Tue, 24 Sep 2002 10:16:39 -0400


> I'm trying to fix selectmodule.c on Windows (it raises
> bogus exceptions, because select() on Windows does not
> set errno).

Are you *sure* about that?

> The first patch I had was this:
[...]
> 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':

Yes, assignment to errno is fine.

--Guido van Rossum (home page: http://www.python.org/~guido/)