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 xiang.zhang
Recipients serhiy.storchaka, xiang.zhang
Date 2016-04-22.04:54:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461300890.73.0.522492647874.issue26824@psf.upfronthosting.co.za>
In-reply-to
Content
According to PEP3123, all accesses to ob_refcnt and ob_type MUST cast the object pointer to PyObject* (unless the pointer is already known to have that type), and SHOULD use the respective accessor macros.

I find that there are still some macros in Python use (obj)->ob_type. Though right now they may not impose any error, but as macros, they may be used with arguments not of type PyObject* later and introduce errors. So I think change them to use Py_TYPE is not a bad idea.
History
Date User Action Args
2016-04-22 04:54:50xiang.zhangsetrecipients: + xiang.zhang, serhiy.storchaka
2016-04-22 04:54:50xiang.zhangsetmessageid: <1461300890.73.0.522492647874.issue26824@psf.upfronthosting.co.za>
2016-04-22 04:54:50xiang.zhanglinkissue26824 messages
2016-04-22 04:54:50xiang.zhangcreate