diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-07-21 06:55:02 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-07-21 06:55:02 (GMT) |
commit | 6819210b9e4e5719a6f7f9c1725f8fa70a8936f6 (patch) | |
tree | 456e2e6b3d9d71e966f3b0e419ecfe44ce3c1fdd /PC | |
parent | b1994b4a5d0139a010eb0af1d6615a3df92fe786 (diff) | |
download | cpython-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 'PC')
-rw-r--r-- | PC/_msi.c | 12 | ||||
-rw-r--r-- | PC/_winreg.c | 3 |
2 files changed, 5 insertions, 10 deletions
@@ -417,8 +417,7 @@ static PyMethodDef record_methods[] = { }; static PyTypeObject record_Type = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ + PyVarObject_HEAD_INIT(NULL, 0) "_msi.Record", /*tp_name*/ sizeof(msiobj), /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -584,8 +583,7 @@ static PyMethodDef summary_methods[] = { }; static PyTypeObject summary_Type = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ + PyVarObject_HEAD_INIT(NULL, 0) "_msi.SummaryInformation", /*tp_name*/ sizeof(msiobj), /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -733,8 +731,7 @@ static PyMethodDef view_methods[] = { }; static PyTypeObject msiview_Type = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ + PyVarObject_HEAD_INIT(NULL, 0) "_msi.View", /*tp_name*/ sizeof(msiobj), /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -851,8 +848,7 @@ static PyMethodDef db_methods[] = { }; static PyTypeObject msidb_Type = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ + PyVarObject_HEAD_INIT(NULL, 0) "_msi.Database", /*tp_name*/ sizeof(msiobj), /*tp_basicsize*/ 0, /*tp_itemsize*/ diff --git a/PC/_winreg.c b/PC/_winreg.c index 920e1d1..9ddbb23 100644 --- a/PC/_winreg.c +++ b/PC/_winreg.c @@ -460,8 +460,7 @@ static PyObject *PyHKEY_getattr(PyObject *self, const char *name); /* The type itself */ PyTypeObject PyHKEY_Type = { - PyObject_HEAD_INIT(0) /* fill in type at module init */ - 0, + PyVarObject_HEAD_INIT(0, 0) /* fill in type at module init */ "PyHKEY", sizeof(PyHKEYObject), 0, |