mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for
tp_clear methods.
This commit is contained in:
parent
ed8f783126
commit
edf17d8798
8 changed files with 30 additions and 57 deletions
|
@ -655,9 +655,7 @@ cm_traverse(classmethod *cm, visitproc visit, void *arg)
|
|||
static int
|
||||
cm_clear(classmethod *cm)
|
||||
{
|
||||
Py_XDECREF(cm->cm_callable);
|
||||
cm->cm_callable = NULL;
|
||||
|
||||
Py_CLEAR(cm->cm_callable);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue