[Python-3000-checkins] r59428 - python/branches/py3k/Objects/classobject.c

christian.heimes python-3000-checkins at python.org
Sat Dec 8 19:27:16 CET 2007


Author: christian.heimes
Date: Sat Dec  8 19:27:16 2007
New Revision: 59428

Modified:
   python/branches/py3k/Objects/classobject.c
Log:
Fixed a bug found by Marcin Kowalczyk
'Applying PyMethod_Type to 3 arguments crashes Python 3'

Modified: python/branches/py3k/Objects/classobject.c
==============================================================================
--- python/branches/py3k/Objects/classobject.c	(original)
+++ python/branches/py3k/Objects/classobject.c	Sat Dec  8 19:27:16 2007
@@ -141,7 +141,7 @@
 
 	if (!_PyArg_NoKeywords("instancemethod", kw))
 		return NULL;
-	if (!PyArg_UnpackTuple(args, "method", 2, 3,
+	if (!PyArg_UnpackTuple(args, "method", 2, 2,
 			      &func, &self))
 		return NULL;
 	if (!PyCallable_Check(func)) {


More information about the Python-3000-checkins mailing list