Mercurial > cpython-lru_cache-weakref
diff Objects/methodobject.c @ 24567:7ca46e08200d 2.2
Remove calls to 2.1 GC API (they are noops).
| author | Neil Schemenauer <nascheme@enme.ucalgary.ca> |
|---|---|
| date | Mon, 05 Aug 2002 14:46:29 +0000 |
| parents | ca7af2a5d915 |
| children |
line wrap: on
line diff
--- a/Objects/methodobject.c Mon Aug 05 06:28:55 2002 +0000 +++ b/Objects/methodobject.c Mon Aug 05 14:46:29 2002 +0000 @@ -22,7 +22,6 @@ op->m_ml = ml; Py_XINCREF(self); op->m_self = self; - PyObject_GC_Init(op); return (PyObject *)op; } @@ -111,7 +110,6 @@ static void meth_dealloc(PyCFunctionObject *m) { - PyObject_GC_Fini(m); Py_XDECREF(m->m_self); m->m_self = (PyObject *)free_list; free_list = m; @@ -216,7 +214,7 @@ PyObject_HEAD_INIT(&PyType_Type) 0, "builtin_function_or_method", - sizeof(PyCFunctionObject) + PyGC_HEAD_SIZE, + sizeof(PyCFunctionObject), 0, (destructor)meth_dealloc, /* tp_dealloc */ 0, /* tp_print */ @@ -233,7 +231,7 @@ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC, /* tp_flags */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ 0, /* tp_doc */ (traverseproc)meth_traverse, /* tp_traverse */ 0, /* tp_clear */ @@ -327,7 +325,6 @@ while (free_list) { PyCFunctionObject *v = free_list; free_list = (PyCFunctionObject *)(v->m_self); - v = (PyCFunctionObject *) PyObject_AS_GC(v); PyObject_DEL(v); } }
