summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Include/object.h2
-rw-r--r--Objects/object.c15
2 files changed, 1 insertions, 16 deletions
diff --git a/Include/object.h b/Include/object.h
index 400e65751..e9eeb0e 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -345,7 +345,7 @@ extern DL_IMPORT(int) PyCallable_Check(PyObject *);
extern DL_IMPORT(int) PyNumber_Coerce(PyObject **, PyObject **);
extern DL_IMPORT(int) PyNumber_CoerceEx(PyObject **, PyObject **);
-extern DL_IMPORT(void) (*PyObject_ClearWeakRefs)(PyObject *);
+extern DL_IMPORT(void) PyObject_ClearWeakRefs(PyObject *);
/* A slot function whose address we need to compare */
extern int _PyObject_SlotCompare(PyObject *, PyObject *);
diff --git a/Objects/object.c b/Objects/object.c
index 88fa340..a008245 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1841,21 +1841,6 @@ PyObject_Free(void *p)
}
-/* Hook to clear up weak references only once the _weakref module is
- imported. We use a dummy implementation to simplify the code at each
- call site instead of requiring a test for NULL.
-*/
-
-static void
-empty_clear_weak_refs(PyObject *o)
-{
- return;
-}
-
-void (*PyObject_ClearWeakRefs)(PyObject *) = empty_clear_weak_refs;
-
-
-
/* These methods are used to control infinite recursion in repr, str, print,
etc. Container objects that may recursively contain themselves,
e.g. builtin dictionaries and lists, should used Py_ReprEnter() and