gh-102304: Move _Py_RefTotal to _PyRuntimeState by ericsnowcurrently · Pull Request #102543 · python/cpython · GitHub

github.com

Tin mới

ericsnowcurrently:consolidate-py-reftotal

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Move _Py_RefTotal to PyInterpreterState #102304

awaiting core review

awaiting core review

gh-102304: Move the Total Refcount to PyInterpreterState #102545

_Py_RefTotal -> REFTOTAL.

Separate the internal helper functions.

Drop the Py_BUILD_CORE case.

_Py_GetRefTotal() -> _Py_GetGlobalRefTotal().

Move _Py_RefTotal to _PyRuntimeState.

Include the legacy total in _Py_GetGlobalRefTotal().

Fix get_global_refcount().

Stop being so clever with PyAPI_FUNC().

Drop unnecessary incr/decr to the reftotal.

Preserve the reftotal past runtime finalization.

Avoid double-counting the final reftotal.

Factor out sync_legacy_reftotal().

Drop last_legacy_reftotal.

Fix the REFTOTAL macro.

_Py_ClearRefTotal() -> _Py_FinalizeRefTotal().

Add a new global to the ingored list.

🔨 test-with-refleak-buildbots

🔨 test-with-refleak-buildbots

Fix _Py_FinalizeRefTotal().

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Gentoo Non-Debug with X 3.x has failed when building commit ad77d16.

gh-102304: Fix Non-Debug Builds #102846

: Fix Non-Debug Builds (

: Move _Py_RefTotal to _PyRuntimeState (

: Fix Non-Debug Builds (

: Move _Py_RefTotal to _PyRuntimeState (

: Fix Non-Debug Builds (