This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients belopolsky, gvanrossum, python-dev, rhettinger, serhiy.storchaka, skrah, vstinner
Date 2020-11-09.22:09:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604959760.07.0.171514260942.issue26200@roundup.psfhosted.org>
In-reply-to
Content
Py_SETREF() is simple wrappers around Py_DECREF() and assignment. If there are macros in Rust it is better to implement Py_SETREF() as Rust macro.

Py_SETREF() was not added to the limited API for reason. If arguments against Py_SETREF() are still valid, the same arguments are applicable to Py_SetRef(). And even if Py_SETREF() will be added to the limited C API I do not think that there is a need of adding Py_SetRef(). It is more cumbersome (additional &), slower and affects the optimization of surrounded code (pointer cannot be in register), and does not have any advantage in addition to the macro.

This issue was closed 4 years ago. Please open a new issue for Py_SetRef().
History
Date User Action Args
2020-11-09 22:09:20serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, rhettinger, belopolsky, vstinner, skrah, python-dev
2020-11-09 22:09:20serhiy.storchakasetmessageid: <1604959760.07.0.171514260942.issue26200@roundup.psfhosted.org>
2020-11-09 22:09:20serhiy.storchakalinkissue26200 messages
2020-11-09 22:09:19serhiy.storchakacreate