mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Change the way __hash__ is inherited; when __eq__ or __cmp__ is overridden
but __hash__ is not, set __hash__ explicitly to None (and tp_hash to NULL). All unit tests pass now!
This commit is contained in:
parent
5431ee4a49
commit
389381564c
6 changed files with 65 additions and 72 deletions
|
@ -320,9 +320,16 @@ PyObject_Print(PyObject *op, FILE *fp, int flags)
|
|||
return internal_print(op, fp, flags, 0);
|
||||
}
|
||||
|
||||
/* For debugging convenience. Set a breakpoint here and call it from your DLL */
|
||||
void
|
||||
_Py_Break(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* For debugging convenience. See Misc/gdbinit for some useful gdb hooks */
|
||||
void _PyObject_Dump(PyObject* op)
|
||||
void
|
||||
_PyObject_Dump(PyObject* op)
|
||||
{
|
||||
if (op == NULL)
|
||||
fprintf(stderr, "NULL\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue