8000 gh-102304: Consolidate Direct Usage of _Py_RefTotal by ericsnowcurrently · Pull Request #102514 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-102304: Consolidate Direct Usage of _Py_RefTotal #102514

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

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move the API declaration to pycore_object.h.
  • Loading branch information
ericsnowcurrently committed Mar 8, 2023
commit 47e8844b7e34ad66e22e53b993b0f70c75ed3f89
5 changes: 4 additions & 1 deletion Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ PyAPI_FUNC(void) _Py_NO_RETURN _Py_FatalRefcountErrorFunc(
_Py_FatalRefcountErrorFunc(__func__, (message))


extern Py_ssize_t _Py_RefTotal;
/* The symbol is only exposed in the API for the sake of extensions
built against the pre-3.12 stable ABI. */
PyAPI_DATA(Py_ssize_t) _Py_RefTotal;

extern void _Py_AddRefTotal(Py_ssize_t);
extern void _Py_IncRefTotal(void);
extern void _Py_DecRefTotal(void);
Expand Down
8000
3 changes: 0 additions & 3 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ _PyObject_CheckConsistency(PyObject *op, int check_content)


#ifdef Py_REF_DEBUG
/* The symbol is only exposed in the API for the sake of extensions
built against the pre-3.12 stable ABI. */
PyAPI_DATA(Py_ssize_t) _Py_RefTotal;
Py_ssize_t _Py_RefTotal;

static inline void
Expand Down
0