Skip to content

Commit

Permalink
Stop being so clever with PyAPI_FUNC().
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsnowcurrently committed Mar 9, 2023
1 parent cc5a99a commit f382c4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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 comments on commit f382c4a

Please sign in to comment.