#define Py_INCREF(op) _Py_INCREF(_PyObject_CAST(op))
-static inline void _Py_DECREF(const char *filename, int lineno,
- PyObject *op)
+static inline void _Py_DECREF(
+#ifdef Py_REF_DEBUG
+ const char *filename, int lineno,
+#endif
+ PyObject *op)
{
- (void)filename; /* may be unused, shut up -Wunused-parameter */
- (void)lineno; /* may be unused, shut up -Wunused-parameter */
_Py_DEC_REFTOTAL;
if (--op->ob_refcnt != 0) {
#ifdef Py_REF_DEBUG
}
}
-#define Py_DECREF(op) _Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
+#ifdef Py_REF_DEBUG
+# define Py_DECREF(op) _Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
+#else
+# define Py_DECREF(op) _Py_DECREF(_PyObject_CAST(op))
+#endif
/* Safely decref `op` and set `op` to NULL, especially useful in tp_clear