mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
* Modules/xxmodule.c: integrated with xxobject.c by Jack
* Modules/(posix,socket}module.c: more NT changes
This commit is contained in:
parent
180d7b4d55
commit
14ed0b2cd3
3 changed files with 169 additions and 13 deletions
|
@ -153,6 +153,18 @@ static object *SocketError;
|
|||
static object *
|
||||
socket_error()
|
||||
{
|
||||
#ifdef NT
|
||||
if (WSAGetLastError()) {
|
||||
object *v;
|
||||
v = mkvalue("(is)", WSAGetLastError(), "winsock error");
|
||||
if (v != NULL) {
|
||||
err_setval(SocketError, v);
|
||||
DECREF(v);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
return err_errno(SocketError);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue