summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Include/internal/pycore_object.h1
-rw-r--r--Objects/object.c2
-rw-r--r--Python/bltinmodule.c3
3 files changed, 4 insertions, 2 deletions
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index eac39c8..10a5746 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -82,6 +82,7 @@ extern void _PyDebug_PrintTotalRefs(void);
#endif
#ifdef Py_TRACE_REFS
+extern void _Py_AddToAllObjects(PyObject *op, int force);
extern void _Py_PrintReferences(FILE *);
extern void _Py_PrintReferenceAddresses(FILE *);
#endif
diff --git a/Objects/object.c b/Objects/object.c
index 43b838a..9eaa163 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -93,7 +93,7 @@ static PyObject refchain = {&refchain, &refchain};
* 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
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 5818eb9..cdb1eaa 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -4,6 +4,7 @@
#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"
@@ -2443,7 +2444,7 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start)
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);