[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.50,2.51
Thomas Wouters
thomas@xs4all.net
Fri, 1 Sep 2000 09:54:09 +0200
On Thu, Aug 31, 2000 at 07:39:03PM -0700, Guido van Rossum wrote:
> Add parens suggested by gcc -Wall.
No! This groups the checks wrong. HASINPLACE(v) *has* to be true for any of
the other tests to happen. I apologize for botching the earlier 2 versions
and failing to check them, I've been a bit swamped in work the past week :P
I've checked them in the way they should be. (And checked, with gcc -Wall,
this time. The error is really gone.)
> ! else if (HASINPLACE(v)
> && ((v->ob_type->tp_as_sequence != NULL &&
> ! (f = v->ob_type->tp_as_sequence->sq_inplace_concat) != NULL))
> || (v->ob_type->tp_as_number != NULL &&
> (f = v->ob_type->tp_as_number->nb_inplace_add) != NULL))
> --- 814,821 ----
> return x;
> }
> ! else if ((HASINPLACE(v)
> && ((v->ob_type->tp_as_sequence != NULL &&
> ! (f = v->ob_type->tp_as_sequence->sq_inplace_concat)
> ! != NULL)))
> || (v->ob_type->tp_as_number != NULL &&
> (f = v->ob_type->tp_as_number->nb_inplace_add) != NULL))
--
Thomas Wouters <thomas@xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!