summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-07-21 06:55:02 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-07-21 06:55:02 (GMT)
commit6819210b9e4e5719a6f7f9c1725f8fa70a8936f6 (patch)
tree456e2e6b3d9d71e966f3b0e419ecfe44ce3c1fdd /Objects/frameobject.c
parentb1994b4a5d0139a010eb0af1d6615a3df92fe786 (diff)
downloadcpython-6819210b9e4e5719a6f7f9c1725f8fa70a8936f6.zip
cpython-6819210b9e4e5719a6f7f9c1725f8fa70a8936f6.tar.gz
cpython-6819210b9e4e5719a6f7f9c1725f8fa70a8936f6.tar.bz2
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 2153cd8..3cb6a0d 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -509,8 +509,7 @@ frame_clear(PyFrameObject *f)
PyTypeObject PyFrame_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
- 0,
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
"frame",
sizeof(PyFrameObject),
sizeof(PyObject *),
@@ -623,7 +622,7 @@ PyFrame_New(PyThreadState *tstate, PyCodeObject *code, PyObject *globals,
--numfree;
f = free_list;
free_list = free_list->f_back;
- if (f->ob_size < extras) {
+ if (Py_Size(f) < extras) {
f = PyObject_GC_Resize(PyFrameObject, f, extras);
if (f == NULL) {
Py_DECREF(builtins);