Skip to content

gh-102304: Rename _Py_IncRefTotal_DO_NOT_USE_THIS() - #107193

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:incref_increftotal
Jul 24, 2023
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:incref_increftotal

Conversation

@vstinner

@vstinner vstinner commented Jul 24, 2023 •

Copy link
Copy Markdown
Member
  • 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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 only 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

3 participants