A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-September/028870.html below:

[Python-Dev] Assign to errno allowed?

[Python-Dev] Assign to errno allowed? [Python-Dev] Assign to errno allowed?Mark Hammond mhammond@skippinet.com.au
Tue, 24 Sep 2002 23:49:05 +1000
> 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) {
> + #ifdef MS_WINDOWS
> +   errno = WSAGetLastError();
> + #endif
>     PyErr_SetFromErrno(SelectError);
>    }
>    else if (n == 0) {

Well, I'd agree it's not good style - therefore it deserves a comment
<wink>.  I'd say with a reasonable comment you should just go for it.

BDFL-pronouncement-not-withstanding ly,

Mark.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4