mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +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
|
@ -81,8 +81,7 @@ cell_traverse(PyCellObject *op, visitproc visit, void *arg)
|
|||
static int
|
||||
cell_clear(PyCellObject *op)
|
||||
{
|
||||
Py_XDECREF(op->ob_ref);
|
||||
op->ob_ref = NULL;
|
||||
Py_CLEAR(op->ob_ref);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue