[Python-checkins] python/dist/src/Modules posixmodule.c, 2.323,
2.324
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Mon Aug 30 19:08:05 CEST 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7723/Modules
Modified Files:
posixmodule.c
Log Message:
win32_urandom(): Raise ValueError if the argument is negative.
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.323
retrieving revision 2.324
diff -u -d -r2.323 -r2.324
--- posixmodule.c 30 Aug 2004 17:02:04 -0000 2.323
+++ posixmodule.c 30 Aug 2004 17:08:02 -0000 2.324
@@ -7246,6 +7246,9 @@
/* Read arguments */
if (! PyArg_ParseTuple(args, "i", &howMany))
return NULL;
+ if (howMany < 0)
+ return PyErr_Format(PyExc_ValueError,
+ "negative argument not allowed");
if (hCryptProv == 0) {
HINSTANCE hAdvAPI32 = NULL;
More information about the Python-checkins
mailing list