[Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.128,1.129
Guido van Rossum
python-dev@python.org
Fri, 1 Dec 2000 05:13:14 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Python getargs.c,2.49,2.50
- Next message: [Python-checkins] CVS: python/dist/src/Doc/lib libcgihttp.tex,1.4,1.5 libcmpcache.tex,1.3,1.4 libcmp.tex,1.2,1.3 libcodeop.tex,1.2,1.3 libcurses.tex,1.22,1.23 libdircache.tex,1.3,1.4 libdl.tex,1.2,1.3 libfilecmp.tex,1.2,1.3 libfpformat.tex,1.2,1.3 liblinecache.tex,1.3,1.4 libmutex.tex,1.3,1.4 libnew.tex,1.6,1.7 libnis.tex,1.4,1.5 libpipes.tex,1.3,1.4 libpty.tex,1.3,1.4 librlcompleter.tex,1.4,1.5 libsched.tex,1.4,1.5 libsimplehttp.tex,1.2,1.3 libstatcache.tex,1.2,1.3 libstatvfs.tex,1.3,1.4 libsunau.tex,1.4,1.5 libtty.tex,1.1,1.2 libturtle.tex,1.2,1.3 libwave.tex,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv14356
Modified Files:
socketmodule.c
Log Message:
Patch by Michael Hudson to clarify the error message from
getsockaddrarg when the address is not a tuple.
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -C2 -r1.128 -r1.129
*** socketmodule.c 2000/10/06 15:37:06 1.128
--- socketmodule.c 2000/12/01 13:13:11 1.129
***************
*** 606,610 ****
int port;
addr=(struct sockaddr_in*)&(s->sock_addr).in;
! if (!PyArg_Parse(args, "(si)", &host, &port))
return 0;
if (setipaddr(host, addr) < 0)
--- 606,616 ----
int port;
addr=(struct sockaddr_in*)&(s->sock_addr).in;
! if (!PyTuple_Check(args)) {
! PyErr_Format(PyExc_TypeError,
! "getsockaddrarg: AF_INET address must be tuple, not %.500s",
! args->ob_type->tp_name);
! return 0;
! }
! if (!PyArg_ParseTuple(args, "si:getsockaddrarg", &host, &port))
return 0;
if (setipaddr(host, addr) < 0)
- Previous message: [Python-checkins] CVS: python/dist/src/Python getargs.c,2.49,2.50
- Next message: [Python-checkins] CVS: python/dist/src/Doc/lib libcgihttp.tex,1.4,1.5 libcmpcache.tex,1.3,1.4 libcmp.tex,1.2,1.3 libcodeop.tex,1.2,1.3 libcurses.tex,1.22,1.23 libdircache.tex,1.3,1.4 libdl.tex,1.2,1.3 libfilecmp.tex,1.2,1.3 libfpformat.tex,1.2,1.3 liblinecache.tex,1.3,1.4 libmutex.tex,1.3,1.4 libnew.tex,1.6,1.7 libnis.tex,1.4,1.5 libpipes.tex,1.3,1.4 libpty.tex,1.3,1.4 librlcompleter.tex,1.4,1.5 libsched.tex,1.4,1.5 libsimplehttp.tex,1.2,1.3 libstatcache.tex,1.2,1.3 libstatvfs.tex,1.3,1.4 libsunau.tex,1.4,1.5 libtty.tex,1.1,1.2 libturtle.tex,1.2,1.3 libwave.tex,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]