Issue #1717, continued: remove PyObject_Compare and Py_CmpToRich declarations

from object.h; don't inherit tp_compare slot on subclasses; and raise TypeError
when initializing a type that has a nonzero tp_compare slot.  Fix up
comparison-related comments in object.c and code.h.
This commit is contained in:
Mark Dickinson 2009-02-01 13:59:22 +00:00
parent f02e0aaafd
commit c008a176af
5 changed files with 24 additions and 38 deletions

View file

@ -20,7 +20,7 @@ typedef struct {
PyObject *co_varnames; /* tuple of strings (local variable names) */
PyObject *co_freevars; /* tuple of strings (free variable names) */
PyObject *co_cellvars; /* tuple of strings (cell variable names) */
/* The rest doesn't count for hash/cmp */
/* The rest doesn't count for hash or comparisons */
PyObject *co_filename; /* unicode (where it was loaded from) */
PyObject *co_name; /* unicode (name, for reference) */
int co_firstlineno; /* first source line number */