mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +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
|
@ -426,10 +426,8 @@ PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);
|
|||
PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyObject_ASCII(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyObject_Bytes(PyObject *);
|
||||
PyAPI_FUNC(int) PyObject_Compare(PyObject *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int);
|
||||
PyAPI_FUNC(int) PyObject_RichCompareBool(PyObject *, PyObject *, int);
|
||||
PyAPI_FUNC(PyObject *) Py_CmpToRich(int op, int cmp);
|
||||
PyAPI_FUNC(PyObject *) PyObject_GetAttrString(PyObject *, const char *);
|
||||
PyAPI_FUNC(int) PyObject_SetAttrString(PyObject *, const char *, PyObject *);
|
||||
PyAPI_FUNC(int) PyObject_HasAttrString(PyObject *, const char *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue