8000 gh-102304: Move _Py_RefTotal to _PyRuntimeState by ericsnowcurrently · Pull Request #102543 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-102304: Move _Py_RefTotal to _PyRuntimeState #102543

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
Stop being so clever with PyAPI_FUNC().
  • Loading branch information
ericsnowcurrently committed Mar 9, 2023
commit f382c4a2d0e33d12a71e4ae6bfa297a9c0546104
4 changes: 2 additions & 2 deletions Include/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ extern Py_ssize_t _Py_RefTotal;
# define _Py_INC_REFTOTAL() _Py_RefTotal++
# define _Py_DEC_REFTOTAL() _Py_RefTotal--
# elif !defined(Py_LIMITED_API) || Py_LIMITED_API+0 > 0x030C0000
extern void _Py_IncRefTotal_DO_NOT_USE_THIS(void);
extern void _Py_DecRefTotal_DO_NOT_USE_THIS(void);
PyAPI_FUNC(void) _Py_IncRefTotal_DO_NOT_USE_THIS(void);
PyAPI_FUNC(void) _Py_DecRefTotal_DO_NOT_USE_THIS(void);
# define _Py_INC_REFTOTAL() _Py_IncRefTotal_DO_NOT_USE_THIS()
# define _Py_DEC_REFTOTAL() _Py_DecRefTotal_DO_NOT_USE_THIS()
# endif
Expand Down
8 changes: 4 additions & 4 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ _Py_NegativeRefcount(const char *filename, int lineno, PyObject *op)
filename, lineno, __func__);
}

/* This is exposed strictly for use in Py_INCREF(). */
PyAPI_FUNC(void)
/* This is used strictly by Py_INCREF(). */
void
_Py_IncRefTotal_DO_NOT_USE_THIS(void)
{
reftotal_increment();
}

/* This is exposed strictly for use in Py_DECREF(). */
PyAPI_FUNC(void)
/* This is used strictly by Py_DECREF(). */
void
_Py_DecRefTotal_DO_NOT_USE_THIS(void)
{
reftotal_decrement();
Expand Down
0