mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
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:
parent
f02e0aaafd
commit
c008a176af
5 changed files with 24 additions and 38 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue