[Python-Dev] CVS: python/dist/src/Objects longobject.c,1.60,1.61
Greg Stein
gstein@lyra.org
Fri, 7 Jul 2000 13:08:15 -0700
On Fri, Jul 07, 2000 at 08:53:31AM -0700, Tim Peters wrote:
>...
> --- 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.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/