summaryrefslogtreecommitdiffstats
path: root/PC
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 /PC
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 'PC')
-rw-r--r--PC/_msi.c12
-rw-r--r--PC/_winreg.c3
2 files changed, 5 insertions, 10 deletions
diff --git a/PC/_msi.c b/PC/_msi.c
index f4af92a..7d60d08 100644
--- a/PC/_msi.c
+++ b/PC/_msi.c
@@ -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,