Skip to content

Commit 2ab3a06

Browse files
committed
Get debug function building on non-debug builds
1 parent 924c06c commit 2ab3a06

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Include/refcount.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,18 @@ you can count such references to the type object.)
223223
*/
224224

225225
#if defined(Py_REF_DEBUG) && !defined(Py_LIMITED_API)
226+
226227
PyAPI_FUNC(void) _Py_NegativeRefcount(const char *filename, int lineno,
227228
PyObject *op);
228229
PyAPI_FUNC(void) _Py_INCREF_IncRefTotal(void);
229230
PyAPI_FUNC(void) _Py_DECREF_DecRefTotal(void);
231+
232+
#else
233+
234+
#define _Py_NegativeRefcount(F, L, O) ((void)0)
235+
#define _Py_INCREF_IncRefTotal() ((void)0)
236+
#define _Py_DECREF_DecRefTotal() ((void)0)
237+
230238
#endif // Py_REF_DEBUG && !Py_LIMITED_API
231239

232240
PyAPI_FUNC(void) _Py_Dealloc(PyObject *);

0 commit comments

Comments
 (0)