[Python-Dev] CVS: python/dist/src/Objects longobject.c,1.60,1.61
Tim Peters
tim_one@email.msn.com
Fri, 7 Jul 2000 16:16:08 -0400
[Greg Stein]
> >...
> > --- 1693,1709 ----
> > sizeof(PyLongObject) - sizeof(digit),
> > sizeof(digit),
> > ! (destructor)long_dealloc, /*tp_dealloc*/
> > ! 0, /*tp_print*/
> > ! 0, /*tp_getattr*/
> > ! 0, /*tp_setattr*/
> > ! (int (*) (PyObject *, PyObject *))
> > ! (cmpfunc)long_compare, /*tp_compare*/
> > ! (reprfunc)long_repr, /*tp_repr*/
> > ! &long_as_number, /*tp_as_number*/
> > ! 0, /*tp_as_sequence*/
> > ! 0, /*tp_as_mapping*/
> > ! (long (*) (PyObject *))
> > ! (hashfunc)long_hash, /*tp_hash*/
> > ! 0, /*tp_call*/
> > ! (reprfunc)long_str, /*tp_str*/
> > };
>
> What is with those double casts for tp_compare and tp_hash? The
> prototypes match cmpfunc and hashfunc, so I think they ought to
> just be dropped.
The patch in this area just normalized the whitespace for easier reading
(although thanks to stinking hard tab characters, it may not *look* that
way!) -- the double casts were there before. I'll be making more changes to
the file "soon", and will look into what you suggest -- suspect you're right
that it's just confusingly redundant.