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

gh-102304: Rename _Py_IncRefTotal_DO_NOT_USE_THIS() #107193

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jul 24, 2023

  • Rename _Py_IncRefTotal_DO_NOT_USE_THIS() to _Py_INCREF_IncRefTotal()
  • Rename _Py_DecRefTotal_DO_NOT_USE_THIS() to _Py_DECREF_DecRefTotal()
  • Remove temporary _Py_INC_REFTOTAL() and _Py_DEC_REFTOTAL() macros

* Rename _Py_IncRefTotal_DO_NOT_USE_THIS() to _Py_INCREF_IncRefTotal()
* Rename _Py_DecRefTotal_DO_NOT_USE_THIS() to _Py_DECREF_DecRefTotal()
* Remove temporary _Py_INC_REFTOTAL() and _Py_DEC_REFTOTAL() macros
@vstinner
Copy link
Member Author

I think that the _Py prefix is now a well defined prefix for private functions which "should not be used":

cc @ericsnowcurrently

@vstinner vstinner enabled auto-merge (squash) July 24, 2023 19:23
@vstinner vstinner merged commit 8ebc9fc into python:main Jul 24, 2023
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 24, 2023
…07193)

* Rename _Py_IncRefTotal_DO_NOT_USE_THIS() to _Py_INCREF_IncRefTotal()
* Rename _Py_DecRefTotal_DO_NOT_USE_THIS() to _Py_DECREF_DecRefTotal()
* Remove temporary _Py_INC_REFTOTAL() and _Py_DEC_REFTOTAL() macros
(cherry picked from commit 8ebc9fc)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-bot
Copy link

GH-107199 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Jul 24, 2023
@vstinner vstinner deleted the incref_increftotal branch July 24, 2023 20:59
vstinner added a commit that referenced this pull request Jul 24, 2023
#107199)

gh-102304: Rename _Py_IncRefTotal_DO_NOT_USE_THIS() (GH-107193)

* Rename _Py_IncRefTotal_DO_NOT_USE_THIS() to _Py_INCREF_IncRefTotal()
* Rename _Py_DecRefTotal_DO_NOT_USE_THIS() to _Py_DECREF_DecRefTotal()
* Remove temporary _Py_INC_REFTOTAL() and _Py_DEC_REFTOTAL() macros
(cherry picked from commit 8ebc9fc)

Co-authored-by: Victor Stinner <vstinner@python.org>
jtcave pushed a commit to jtcave/cpython that referenced this pull request Jul 27, 2023
)

* Rename _Py_IncRefTotal_DO_NOT_USE_THIS() to _Py_INCREF_IncRefTotal()
* Rename _Py_DecRefTotal_DO_NOT_USE_THIS() to _Py_DECREF_DecRefTotal()
* Remove temporary _Py_INC_REFTOTAL() and _Py_DEC_REFTOTAL() macros
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.

3 participants