Skip to content

Commit f382c4a

Browse files
Stop being so clever with PyAPI_FUNC().
1 parent cc5a99a commit f382c4a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Include/object.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,8 @@ extern Py_ssize_t _Py_RefTotal;
495495
# define _Py_INC_REFTOTAL() _Py_RefTotal++
496496
# define _Py_DEC_REFTOTAL() _Py_RefTotal--
497497
# elif !defined(Py_LIMITED_API) || Py_LIMITED_API+0 > 0x030C0000
498-
extern void _Py_IncRefTotal_DO_NOT_USE_THIS(void);
499-
extern void _Py_DecRefTotal_DO_NOT_USE_THIS(void);
498+
PyAPI_FUNC(void) _Py_IncRefTotal_DO_NOT_USE_THIS(void);
499+
PyAPI_FUNC(void) _Py_DecRefTotal_DO_NOT_USE_THIS(void);
500500
# define _Py_INC_REFTOTAL() _Py_IncRefTotal_DO_NOT_USE_THIS()
501501
# define _Py_DEC_REFTOTAL() _Py_DecRefTotal_DO_NOT_USE_THIS()
502502
# endif

Objects/object.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ _Py_NegativeRefcount(const char *filename, int lineno, PyObject *op)
158158
filename, lineno, __func__);
159159
}
160160

161-
/* This is exposed strictly for use in Py_INCREF(). */
162-
PyAPI_FUNC(void)
161+
/* This is used strictly by Py_INCREF(). */
162+
void
163163
_Py_IncRefTotal_DO_NOT_USE_THIS(void)
164164
{
165165
reftotal_increment();
166166
}
167167

168-
/* This is exposed strictly for use in Py_DECREF(). */
169-
PyAPI_FUNC(void)
168+
/* This is used strictly by Py_DECREF(). */
169+
void
170170
_Py_DecRefTotal_DO_NOT_USE_THIS(void)
171171
{
172172
reftotal_decrement();

0 commit comments

Comments
 (0)