X Tutup
The Wayback Machine - https://web.archive.org/web/20221223152348/https://github.com/python/cpython/pull/99844
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use _Py_RVALUE() in macros #99844

Merged
merged 1 commit into from Nov 28, 2022
Merged

Use _Py_RVALUE() in macros #99844

merged 1 commit into from Nov 28, 2022

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 28, 2022

The following macros are modified to use _Py_RVALUE(), so they can no longer be used as l-value:

  • DK_LOG_SIZE()
  • _PyCode_CODE()
  • _PyList_ITEMS()
  • _PyTuple_ITEMS()
  • _Py_SLIST_HEAD()
  • _Py_SLIST_ITEM_NEXT()

_PyCode_CODE() is private and other macros are part of the internal C API.

The following macros are modified to use _Py_RVALUE(), so they can no
longer be used as l-value:

* DK_LOG_SIZE()
* _PyCode_CODE()
* _PyList_ITEMS()
* _PyTuple_ITEMS()
* _Py_SLIST_HEAD()
* _Py_SLIST_ITEM_NEXT()

_PyCode_CODE() is private and other macros are part of the internal C
API.
@vstinner
Copy link
Member Author

vstinner commented Nov 28, 2022

PR rebased to fix a conflict.

@vstinner vstinner merged commit 7bae15c into python:main Nov 28, 2022
13 checks passed
@vstinner vstinner deleted the rvalue branch Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants
X Tutup