File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6114,7 +6114,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
61146114 else if (Py_TYPE (descr ) == & PyCFunction_Type &&
61156115 PyCFunction_GET_FUNCTION (descr ) ==
61166116 (PyCFunction )tp_new_wrapper &&
6117- strcmp ( p -> name , "__new__" ) == 0 )
6117+ ptr == ( void * * ) & type -> tp_new )
61186118 {
61196119 /* The __new__ wrapper is not a wrapper descriptor,
61206120 so must be special-cased differently.
@@ -6134,7 +6134,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
61346134 point out a bug in this reasoning a beer. */
61356135 }
61366136 else if (descr == Py_None &&
6137- strcmp ( p -> name , "__hash__" ) == 0 ) {
6137+ ptr == ( void * * ) & type -> tp_hash ) {
61386138 /* We specifically allow __hash__ to be set to None
61396139 to prevent inheritance of the default
61406140 implementation from object.__hash__ */
You can’t perform that action at this time.
0 commit comments