[Python-checkins] python/dist/src/Objects abstract.c,2.99,2.100
gvanrossum@sourceforge.net
gvanrossum@sourceforge.net
Tue, 16 Apr 2002 09:44:54 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv27997/Objects
Modified Files:
abstract.c
Log Message:
SF bug 544647.
PyNumber_InPlaceMultiply insisted on calling sq_inplace_repeat if it
existed, even if nb_inplace_multiply also existed and the arguments
weren't right for sq_inplace_repeat. Change this to only use
sq_inplace_repeat if nb_inplace_multiply isn't defined.
Bugfix candidate.
Index: abstract.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v
retrieving revision 2.99
retrieving revision 2.100
diff -C2 -d -r2.99 -r2.100
*** abstract.c 16 Apr 2002 16:32:50 -0000 2.99
--- abstract.c 16 Apr 2002 16:44:51 -0000 2.100
***************
*** 743,748 ****
{
PyObject * (*g)(PyObject *, int) = NULL;
! if (HASINPLACE(v) && v->ob_type->tp_as_sequence &&
! (g = v->ob_type->tp_as_sequence->sq_inplace_repeat)) {
long n;
if (PyInt_Check(w)) {
--- 743,752 ----
{
PyObject * (*g)(PyObject *, int) = NULL;
! if (HASINPLACE(v) &&
! v->ob_type->tp_as_sequence &&
! (g = v->ob_type->tp_as_sequence->sq_inplace_repeat) &&
! !(v->ob_type->tp_as_number &&
! v->ob_type->tp_as_number->nb_inplace_multiply))
! {
long n;
if (PyInt_Check(w)) {