Message260048
> New changeset 3084914245d2 by Raymond Hettinger in branch 'default':
> Issue #26200: The SETREF macro adds unnecessary work in some cases.
> https://hg.python.org/cpython/rev/3084914245d2
The code using Py_DECREF() doesn't look to be vulnerable to the bug described in Py_SETREF() doc. The change (revert) looks good to me.
So I understand that calling Py_DECREF() manually (in the "right" order, as done in the change) is a reasonable answer to users wanting a "fast" Py_SETREF().
What do you think?
I don't suggest to mention it in Py_SETREF() documentation. I would prefer that users who don't understand well reference counting (ex: me ;-)) use Py_SETREF() to avoid bugs. |
|
Date |
User |
Action |
Args |
2016-02-10 22:26:50 | vstinner | set | recipients:
+ vstinner, rhettinger, python-dev, serhiy.storchaka |
2016-02-10 22:26:50 | vstinner | set | messageid: <1455143210.93.0.426639347101.issue26200@psf.upfronthosting.co.za> |
2016-02-10 22:26:50 | vstinner | link | issue26200 messages |
2016-02-10 22:26:50 | vstinner | create | |
|