summaryrefslogtreecommitdiff
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-03-17 16:58:12 +0100
committerGeorg Brandl <georg@python.org>2012-03-17 16:58:12 +0100
commitffd4830f6ab0942a463772a01a91f051bfa2d376 (patch)
tree14d5f982ed3d51197f0dd69370d3f6002aec8e1e /Modules/gcmodule.c
parent206a0cc1b0f2545eef212be6210b4bf7008815ba (diff)
parent5d6d9423be73e8c6f3f18fa3e006573fc5836236 (diff)
downloadcpython-ffd4830f6ab0942a463772a01a91f051bfa2d376.tar.gz
merge with 3.2
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r--Modules/gcmodule.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 10a4ed7f6a..1876e93884 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -680,8 +680,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
static void
debug_cycle(char *msg, PyObject *op)
{
- PySys_WriteStderr("gc: %.100s <%.100s %p>\n",
- msg, Py_TYPE(op)->tp_name, op);
+ PySys_FormatStderr("gc: %s <%s %p>\n",
+ msg, Py_TYPE(op)->tp_name, op);
}
/* Handle uncollectable garbage (cycles with finalizers, and stuff reachable
@@ -762,6 +762,9 @@ clear_freelists(void)
(void)PyTuple_ClearFreeList();
(void)PyUnicode_ClearFreeList();
(void)PyFloat_ClearFreeList();
+ (void)PyList_ClearFreeList();
+ (void)PyDict_ClearFreeList();
+ (void)PySet_ClearFreeList();
}
static double
@@ -769,7 +772,9 @@ get_time(void)
{
double result = 0;
if (tmod != NULL) {
- PyObject *f = PyObject_CallMethod(tmod, "time", NULL);
+ _Py_IDENTIFIER(time);
+
+ PyObject *f = _PyObject_CallMethodId(tmod, &PyId_time, NULL);
if (f == NULL) {
PyErr_Clear();
}