#endif
#ifdef Py_TRACE_REFS
+extern void _Py_AddToAllObjects(PyObject *op, int force);
extern void _Py_PrintReferences(FILE *);
extern void _Py_PrintReferenceAddresses(FILE *);
#endif
* way, though; exceptions include statically allocated type objects, and
* statically allocated singletons (like Py_True and Py_None).
*/
-static void
+void
_Py_AddToAllObjects(PyObject *op, int force)
{
#ifdef Py_DEBUG
#include <ctype.h>
#include "ast.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
+#include "pycore_object.h"
#include "pycore_pyerrors.h"
#include "pycore_pystate.h"
#include "pycore_tupleobject.h"
would change the value of empty. In fact, using
in-place addition rather that binary addition for
any of the steps introduces subtle behavior changes:
-
+
https://bugs.python.org/issue18305 */
temp = PyNumber_Add(result, item);
Py_DECREF(result);