summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-04-09 19:24:53 (GMT)
committerGuido van Rossum <guido@python.org>1997-04-09 19:24:53 (GMT)
commit644a12b00ce6a361089b488aa8096a6c86b52275 (patch)
tree73e3cfeeba809a3fc43f42d1883ebe9dffe3ffda /Modules/socketmodule.c
parent801776742082034cc6193530326af042d5af56a5 (diff)
downloadcpython-644a12b00ce6a361089b488aa8096a6c86b52275.zip
cpython-644a12b00ce6a361089b488aa8096a6c86b52275.tar.gz
cpython-644a12b00ce6a361089b488aa8096a6c86b52275.tar.bz2
Tweaks to keep the Microsoft compiler quier.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 27eb313..7b73b63 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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