From df2989a997fe8ca43c47b23098b1eea2355645ff Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Sun, 15 Nov 2015 22:51:39 -0500 Subject: [PATCH] Fix PyTypeObject initialization. --- src/python/compression_wrapper-py.c | 3 +-- src/python/contentstat-py.c | 3 +-- src/python/load_metadata-py.c | 3 +-- src/python/locate_metadata-py.c | 3 +-- src/python/package-py.c | 3 +-- src/python/repomd-py.c | 3 +-- src/python/repomdrecord-py.c | 3 +-- src/python/sqlite-py.c | 3 +-- src/python/updatecollection-py.c | 3 +-- src/python/updatecollectionpackage-py.c | 3 +-- src/python/updateinfo-py.c | 3 +-- src/python/updaterecord-py.c | 3 +-- src/python/updatereference-py.c | 3 +-- src/python/xml_file-py.c | 3 +-- 14 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/python/compression_wrapper-py.c b/src/python/compression_wrapper-py.c index 2598121..63f7cd7 100644 --- a/src/python/compression_wrapper-py.c +++ b/src/python/compression_wrapper-py.c @@ -255,8 +255,7 @@ static struct PyMethodDef crfile_methods[] = { }; PyTypeObject CrFile_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.CrFile", /* tp_name */ sizeof(_CrFileObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/contentstat-py.c b/src/python/contentstat-py.c index 1883aac..e69db67 100644 --- a/src/python/contentstat-py.c +++ b/src/python/contentstat-py.c @@ -219,8 +219,7 @@ static PyGetSetDef contentstat_getsetters[] = { /* Object */ PyTypeObject ContentStat_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.ContentStat", /* tp_name */ sizeof(_ContentStatObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/load_metadata-py.c b/src/python/load_metadata-py.c index fc9a272..a7cee06 100644 --- a/src/python/load_metadata-py.c +++ b/src/python/load_metadata-py.c @@ -351,8 +351,7 @@ static struct PyMethodDef metadata_methods[] = { /* Object */ PyTypeObject Metadata_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.Metadata", /* tp_name */ sizeof(_MetadataObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/locate_metadata-py.c b/src/python/locate_metadata-py.c index ba3e6f0..6db3362 100644 --- a/src/python/locate_metadata-py.c +++ b/src/python/locate_metadata-py.c @@ -179,8 +179,7 @@ static PyMappingMethods mapping_methods = { /* Object */ PyTypeObject MetadataLocation_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.MetadataLocation",/* tp_name */ sizeof(_MetadataLocationObject),/* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/package-py.c b/src/python/package-py.c index eb6314b..d616193 100644 --- a/src/python/package-py.c +++ b/src/python/package-py.c @@ -578,8 +578,7 @@ static PyGetSetDef package_getsetters[] = { /* Object */ PyTypeObject Package_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.Package", /* tp_name */ sizeof(_PackageObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/repomd-py.c b/src/python/repomd-py.c index 1e21e68..7ba1bf7 100644 --- a/src/python/repomd-py.c +++ b/src/python/repomd-py.c @@ -470,8 +470,7 @@ static PyGetSetDef repomd_getsetters[] = { PyTypeObject Repomd_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.Repomd", /* tp_name */ sizeof(_RepomdObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/repomdrecord-py.c b/src/python/repomdrecord-py.c index 504fb0a..4ad28e9 100644 --- a/src/python/repomdrecord-py.c +++ b/src/python/repomdrecord-py.c @@ -393,8 +393,7 @@ static PyGetSetDef repomdrecord_getsetters[] = { /* Object */ PyTypeObject RepomdRecord_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.RepomdRecord", /* tp_name */ sizeof(_RepomdRecordObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/sqlite-py.c b/src/python/sqlite-py.c index 06e9541..981a49f 100644 --- a/src/python/sqlite-py.c +++ b/src/python/sqlite-py.c @@ -206,8 +206,7 @@ static struct PyMethodDef sqlite_methods[] = { }; PyTypeObject Sqlite_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.Sqlite", /* tp_name */ sizeof(_SqliteObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/updatecollection-py.c b/src/python/updatecollection-py.c index 5d36f40..a14b4ec 100644 --- a/src/python/updatecollection-py.c +++ b/src/python/updatecollection-py.c @@ -278,8 +278,7 @@ static PyGetSetDef updatecollection_getsetters[] = { /* Object */ PyTypeObject UpdateCollection_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.UpdateCollection",/* tp_name */ sizeof(_UpdateCollectionObject),/* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/updatecollectionpackage-py.c b/src/python/updatecollectionpackage-py.c index 1144554..df0d352 100644 --- a/src/python/updatecollectionpackage-py.c +++ b/src/python/updatecollectionpackage-py.c @@ -233,8 +233,7 @@ static PyGetSetDef updatecollectionpackage_getsetters[] = { /* Object */ PyTypeObject UpdateCollectionPackage_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.UpdateCollectionPackage", /* tp_name */ sizeof(_UpdateCollectionPackageObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/updateinfo-py.c b/src/python/updateinfo-py.c index b0035e7..6786f14 100644 --- a/src/python/updateinfo-py.c +++ b/src/python/updateinfo-py.c @@ -271,8 +271,7 @@ static PyGetSetDef updateinfo_getsetters[] = { PyTypeObject UpdateInfo_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.UpdateInfo", /* tp_name */ sizeof(_UpdateInfoObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/updaterecord-py.c b/src/python/updaterecord-py.c index 37aef08..5042f0a 100644 --- a/src/python/updaterecord-py.c +++ b/src/python/updaterecord-py.c @@ -394,8 +394,7 @@ static PyGetSetDef updaterecord_getsetters[] = { /* Object */ PyTypeObject UpdateRecord_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.UpdateRecord", /* tp_name */ sizeof(_UpdateRecordObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/updatereference-py.c b/src/python/updatereference-py.c index def1ba8..86a7d67 100644 --- a/src/python/updatereference-py.c +++ b/src/python/updatereference-py.c @@ -191,8 +191,7 @@ static PyGetSetDef updatereference_getsetters[] = { /* Object */ PyTypeObject UpdateReference_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.UpdateReference", /* tp_name */ sizeof(_UpdateReferenceObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/src/python/xml_file-py.c b/src/python/xml_file-py.c index af86cad..77daf56 100644 --- a/src/python/xml_file-py.c +++ b/src/python/xml_file-py.c @@ -273,8 +273,7 @@ static struct PyMethodDef xmlfile_methods[] = { }; PyTypeObject XmlFile_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + PyVarObject_HEAD_INIT(NULL, 0) "createrepo_c.XmlFile", /* tp_name */ sizeof(_XmlFileObject), /* tp_basicsize */ 0, /* tp_itemsize */ -- 2.7.4