Tweaks to keep the Microsoft compiler quier.

This commit is contained in:
Guido van Rossum 1997-04-09 19:24:53 +00:00
parent 8017767420
commit 644a12b00c
8 changed files with 36 additions and 19 deletions

View file

@ -417,7 +417,7 @@ getsockaddrarg,PySocketSockObject *,s, PyObject *,args, struct sockaddr **,addr_
if (setipaddr(host, addr) < 0)
return 0;
addr->sin_family = AF_INET;
addr->sin_port = htons(port);
addr->sin_port = htons((short)port);
*addr_ret = (struct sockaddr *) addr;
*len_ret = sizeof *addr;
return 1;
@ -516,7 +516,9 @@ static PyObject *
BUILD_FUNC_DEF_2(PySocketSock_setblocking,PySocketSockObject*,s,PyObject*,args)
{
int block;
#ifndef MS_WINDOWS
int delay_flag;
#endif
if (!PyArg_GetInt(args, &block))
return NULL;
Py_BEGIN_ALLOW_THREADS