commit | 9bbac5065e09bc559581205a2b0da60b15803040 | [log] [tgz] |
---|---|---|
author | Christian Heimes <christian@cheimes.de> | Sat Dec 08 18:27:16 2007 +0000 |
committer | Christian Heimes <christian@cheimes.de> | Sat Dec 08 18:27:16 2007 +0000 |
tree | 72138b175ca19922eb91c0a993b15336b98e954f | |
parent | a33eb06e3b29cc5df520bbb28261bd370f510932 [diff] [blame] |
Fixed a bug found by Marcin Kowalczyk 'Applying PyMethod_Type to 3 arguments crashes Python 3'
diff --git a/Objects/classobject.c b/Objects/classobject.c index 5362fbc..5500ed5 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c
@@ -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)) {