[Python-checkins] python/dist/src/Modules socketmodule.c, 1.306, 1.307

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Tue Sep 28 04:19:43 CEST 2004


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9574

Modified Files:
	socketmodule.c 
Log Message:
Silence a compiler warning by supplying the correct argument type to
the htons() function.



Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -d -r1.306 -r1.307
--- socketmodule.c	13 Sep 2004 17:48:41 -0000	1.306
+++ socketmodule.c	28 Sep 2004 02:19:40 -0000	1.307
@@ -2944,10 +2944,10 @@
 static PyObject *
 socket_getservbyport(PyObject *self, PyObject *args)
 {
-	int port;
+	unsigned short port;
 	char *proto=NULL;
 	struct servent *sp;
-	if (!PyArg_ParseTuple(args, "i|s:getservbyport", &port, &proto))
+	if (!PyArg_ParseTuple(args, "H|s:getservbyport", &port, &proto))
 		return NULL;
 	Py_BEGIN_ALLOW_THREADS
 	sp = getservbyport(htons(port), proto);



More information about the Python-checkins mailing list