[Python-checkins] python/dist/src/Objects rangeobject.c, 2.54, 2.55 setobject.c, 1.55, 1.56 bufferobject.c, 2.26, 2.27 sliceobject.c, 2.22, 2.23
birkenfeld@users.sourceforge.net
birkenfeld at users.sourceforge.net
Fri Aug 26 08:42:41 CEST 2005
- Previous message: [Python-checkins] python/dist/src/Misc NEWS,1.1352,1.1353
- Next message: [Python-checkins] python/dist/src/Modules arraymodule.c, 2.98, 2.99 itertoolsmodule.c, 1.40, 1.41 operator.c, 2.30, 2.31 _randommodule.c, 1.7, 1.8 zipimport.c, 1.18, 1.19 collectionsmodule.c, 1.38, 1.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18370/Objects
Modified Files:
rangeobject.c setobject.c bufferobject.c sliceobject.c
Log Message:
Disallow keyword arguments for type constructors that don't use them.
(fixes bug #1119418)
Index: rangeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v
retrieving revision 2.54
retrieving revision 2.55
diff -u -d -r2.54 -r2.55
--- rangeobject.c 3 Dec 2004 11:45:13 -0000 2.54
+++ rangeobject.c 26 Aug 2005 06:42:30 -0000 2.55
@@ -45,6 +45,9 @@
long ilow = 0, ihigh = 0, istep = 1;
long n;
+ if (!_PyArg_NoKeywords("xrange()", kw))
+ return NULL;
+
if (PyTuple_Size(args) <= 1) {
if (!PyArg_ParseTuple(args,
"l;xrange() requires 1-3 int arguments",
Index: setobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/setobject.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- setobject.c 24 Aug 2005 00:24:40 -0000 1.55
+++ setobject.c 26 Aug 2005 06:42:30 -0000 1.56
@@ -935,6 +935,9 @@
{
PyObject *iterable = NULL, *result;
+ if (!_PyArg_NoKeywords("frozenset()", kwds))
+ return NULL;
+
if (!PyArg_UnpackTuple(args, type->tp_name, 0, 1, &iterable))
return NULL;
@@ -976,6 +979,9 @@
static PyObject *
set_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
+ if (!_PyArg_NoKeywords("set()", kwds))
+ return NULL;
+
return make_new_set(type, NULL);
}
Index: bufferobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/bufferobject.c,v
retrieving revision 2.26
retrieving revision 2.27
diff -u -d -r2.26 -r2.27
--- bufferobject.c 24 Sep 2004 19:17:26 -0000 2.26
+++ bufferobject.c 26 Aug 2005 06:42:30 -0000 2.27
@@ -192,7 +192,10 @@
int offset = 0;
int size = Py_END_OF_BUFFER;
- if ( !PyArg_ParseTuple(args, "O|ii:buffer", &ob, &offset, &size) )
+ if (!_PyArg_NoKeywords("buffer()", kw))
+ return NULL;
+
+ if (!PyArg_ParseTuple(args, "O|ii:buffer", &ob, &offset, &size))
return NULL;
return PyBuffer_FromObject(ob, offset, size);
}
Index: sliceobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v
retrieving revision 2.22
retrieving revision 2.23
diff -u -d -r2.22 -r2.23
--- sliceobject.c 5 Sep 2003 14:27:30 -0000 2.22
+++ sliceobject.c 26 Aug 2005 06:42:30 -0000 2.23
@@ -174,6 +174,9 @@
start = stop = step = NULL;
+ if (!_PyArg_NoKeywords("slice()", kw))
+ return NULL;
+
if (!PyArg_UnpackTuple(args, "slice", 1, 3, &start, &stop, &step))
return NULL;
- Previous message: [Python-checkins] python/dist/src/Misc NEWS,1.1352,1.1353
- Next message: [Python-checkins] python/dist/src/Modules arraymodule.c, 2.98, 2.99 itertoolsmodule.c, 1.40, 1.41 operator.c, 2.30, 2.31 _randommodule.c, 1.7, 1.8 zipimport.c, 1.18, 1.19 collectionsmodule.c, 1.38, 1.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list