bpo-45476: Disallow using PyFloat_AS_DOUBLE() as l-value by vstinner · Pull Request #28976 · python/cpython
vstinner
changed the title
bpo-45476: Add _Py_RVALUE() macro
bpo-45476: Disallow using PyFloat_AS_DOUBLE() as l-value
vstinner
marked this pull request as ready for review
The following "GET" and "AS" functions can no longer be used as l-value (to modify a Python object): * PyByteArray_GET_SIZE() * PyBytes_GET_SIZE() * PyCFunction_GET_CLASS() * PyCFunction_GET_FLAGS() * PyCFunction_GET_FUNCTION() * PyCFunction_GET_SELF() * PyDict_GET_SIZE() * PyFloat_AS_DOUBLE() * PyFunction_GET_ANNOTATIONS() * PyFunction_GET_CLOSURE() * PyFunction_GET_CODE() * PyFunction_GET_DEFAULTS() * PyFunction_GET_GLOBALS() * PyFunction_GET_KW_DEFAULTS() * PyFunction_GET_MODULE() * PyHeapType_GET_MEMBERS() * PyInstanceMethod_GET_FUNCTION() * PyList_GET_SIZE() * PyMemoryView_GET_BASE() * PyMemoryView_GET_BUFFER() * PyMethod_GET_FUNCTION() * PyMethod_GET_SELF() * PySet_GET_SIZE() * PyTuple_GET_SIZE() * PyWeakref_GET_OBJECT() These macros are modified to use the _Py_RVALUE() macro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters