summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/header-py.c2
-rw-r--r--python/rpmdb-py.c2
-rw-r--r--python/rpmds-py.c2
-rw-r--r--python/rpmfd-py.c2
-rw-r--r--python/rpmfi-py.c4
-rw-r--r--python/rpmmi-py.c2
-rw-r--r--python/rpmmodule.c14
-rw-r--r--python/rpmps-py.c2
-rw-r--r--python/rpmte-py.c2
-rw-r--r--python/rpmts-py.c4
10 files changed, 0 insertions, 36 deletions
diff --git a/python/header-py.c b/python/header-py.c
index 5049db192..f1c1f663b 100644
--- a/python/header-py.c
+++ b/python/header-py.c
@@ -526,7 +526,6 @@ PyTypeObject hdr_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
hdr_doc, /* tp_doc */
-#if Py_TPFLAGS_HAVE_ITER
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
@@ -546,7 +545,6 @@ PyTypeObject hdr_Type = {
0, /* tp_new */
0, /* tp_free */
0, /* tp_is_gc */
-#endif
};
hdrObject * hdr_Wrap(Header h)
diff --git a/python/rpmdb-py.c b/python/rpmdb-py.c
index 44be4d594..c6778526e 100644
--- a/python/rpmdb-py.c
+++ b/python/rpmdb-py.c
@@ -236,7 +236,6 @@ PyTypeObject rpmdb_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
rpmdb_doc, /* tp_doc */
-#if Py_TPFLAGS_HAVE_ITER
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
@@ -256,6 +255,5 @@ PyTypeObject rpmdb_Type = {
0, /* tp_new */
0, /* tp_free */
0, /* tp_is_gc */
-#endif
};
diff --git a/python/rpmds-py.c b/python/rpmds-py.c
index e42b93a73..7dd5a0be6 100644
--- a/python/rpmds-py.c
+++ b/python/rpmds-py.c
@@ -577,7 +577,6 @@ PyTypeObject rpmds_Type = {
Py_TPFLAGS_DEFAULT | /* tp_flags */
Py_TPFLAGS_HAVE_RICHCOMPARE,
rpmds_doc, /* tp_doc */
-#if Py_TPFLAGS_HAVE_ITER
0, /* tp_traverse */
0, /* tp_clear */
(richcmpfunc) rpmds_richcompare,/* tp_richcompare */
@@ -597,7 +596,6 @@ PyTypeObject rpmds_Type = {
(newfunc) rpmds_new, /* tp_new */
(freefunc) rpmds_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
/* ---------- */
diff --git a/python/rpmfd-py.c b/python/rpmfd-py.c
index 215d1a948..dc9222823 100644
--- a/python/rpmfd-py.c
+++ b/python/rpmfd-py.c
@@ -274,7 +274,6 @@ PyTypeObject rpmfd_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
rpmfd_doc, /* tp_doc */
-#if Py_TPFLAGS_HAVE_ITER
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
@@ -294,7 +293,6 @@ PyTypeObject rpmfd_Type = {
(newfunc) rpmfd_new, /* tp_new */
(freefunc) rpmfd_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
rpmfdObject * rpmfd_Wrap(FD_t fd)
diff --git a/python/rpmfi-py.c b/python/rpmfi-py.c
index 59c2e4c47..d3a18751e 100644
--- a/python/rpmfi-py.c
+++ b/python/rpmfi-py.c
@@ -157,14 +157,12 @@ rpmfi_FClass(rpmfiObject * s)
return Py_BuildValue("s", xstrdup(FClass));
}
-#if Py_TPFLAGS_HAVE_ITER
static PyObject *
rpmfi_iter(rpmfiObject * s)
{
Py_INCREF(s);
return (PyObject *)s;
}
-#endif
static PyObject *
rpmfi_iternext(rpmfiObject * s)
@@ -473,7 +471,6 @@ PyTypeObject rpmfi_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
rpmfi_doc, /* tp_doc */
-#if Py_TPFLAGS_HAVE_ITER
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
@@ -493,7 +490,6 @@ PyTypeObject rpmfi_Type = {
(newfunc) rpmfi_new, /* tp_new */
(freefunc) rpmfi_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
/* ---------- */
diff --git a/python/rpmmi-py.c b/python/rpmmi-py.c
index 3c347ac08..1b9907e1a 100644
--- a/python/rpmmi-py.c
+++ b/python/rpmmi-py.c
@@ -223,7 +223,6 @@ PyTypeObject rpmmi_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
rpmmi_doc, /* tp_doc */
-#if Py_TPFLAGS_HAVE_ITER
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
@@ -243,7 +242,6 @@ PyTypeObject rpmmi_Type = {
0, /* tp_new */
0, /* tp_free */
0, /* tp_is_gc */
-#endif
};
rpmmiObject * rpmmi_Wrap(rpmdbMatchIterator mi, PyObject *s)
diff --git a/python/rpmmodule.c b/python/rpmmodule.c
index d0ea29b2d..4984e307b 100644
--- a/python/rpmmodule.c
+++ b/python/rpmmodule.c
@@ -234,7 +234,6 @@ void init_rpm(void)
{
PyObject * d, *o, *tag = NULL, *dict, *m;
-#if Py_TPFLAGS_HAVE_ITER /* XXX backport to python-1.5.2 */
if (PyType_Ready(&hdr_Type) < 0) return;
if (PyType_Ready(&rpmds_Type) < 0) return;
if (PyType_Ready(&rpmfd_Type) < 0) return;
@@ -245,7 +244,6 @@ void init_rpm(void)
if (PyType_Ready(&rpmte_Type) < 0) return;
if (PyType_Ready(&rpmts_Type) < 0) return;
if (PyType_Ready(&spec_Type) < 0) return;
-#endif
m = Py_InitModule3("_rpm", rpmModuleMethods, rpm__doc__);
if (m == NULL)
@@ -266,7 +264,6 @@ void init_rpm(void)
if (pyrpmError != NULL)
PyDict_SetItemString(d, "error", pyrpmError);
-#if Py_TPFLAGS_HAVE_ITER /* XXX backport to python-1.5.2 */
Py_INCREF(&hdr_Type);
PyModule_AddObject(m, "hdr", (PyObject *) &hdr_Type);
@@ -293,17 +290,6 @@ void init_rpm(void)
Py_INCREF(&spec_Type);
PyModule_AddObject(m, "spec", (PyObject *) &spec_Type);
-#else
- hdr_Type.ob_type = &PyType_Type;
- rpmds_Type.ob_type = &PyType_Type;
- rpmfd_Type.ob_type = &PyType_Type;
- rpmfi_Type.ob_type = &PyType_Type;
- rpmmi_Type.ob_type = &PyType_Type;
- rpmps_Type.ob_type = &PyType_Type;
- rpmte_Type.ob_type = &PyType_Type;
- rpmts_Type.ob_type = &PyType_Type;
- spec_Type.ob_type = &PyType_Type;
-#endif
dict = PyDict_New();
{ const char *tname, *sname;
diff --git a/python/rpmps-py.c b/python/rpmps-py.c
index 1914c6c6b..718a9bb06 100644
--- a/python/rpmps-py.c
+++ b/python/rpmps-py.c
@@ -254,7 +254,6 @@ PyTypeObject rpmps_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
rpmps_doc, /* tp_doc */
-#if Py_TPFLAGS_HAVE_ITER
0, /* tp_traverse */
0, /* tp_clear */
(richcmpfunc)0, /* tp_richcompare */
@@ -274,7 +273,6 @@ PyTypeObject rpmps_Type = {
(newfunc) rpmps_new, /* tp_new */
(freefunc) rpmps_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
/* ---------- */
diff --git a/python/rpmte-py.c b/python/rpmte-py.c
index 75d1cb197..412e54306 100644
--- a/python/rpmte-py.c
+++ b/python/rpmte-py.c
@@ -335,7 +335,6 @@ PyTypeObject rpmte_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
rpmte_doc, /* tp_doc */
-#if Py_TPFLAGS_HAVE_ITER
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
@@ -355,7 +354,6 @@ PyTypeObject rpmte_Type = {
0, /* tp_new */
0, /* tp_free */
0, /* tp_is_gc */
-#endif
};
rpmteObject * rpmte_Wrap(rpmte te)
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index d4f2cf240..5d7c12c85 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -967,7 +967,6 @@ fprintf(stderr, "*** rpmts_Run(%p) ts %p ignore %x\n", s, s->ts, s->ignoreSet);
return list;
}
-#if Py_TPFLAGS_HAVE_ITER
static PyObject *
rpmts_iter(rpmtsObject * s)
{
@@ -977,7 +976,6 @@ fprintf(stderr, "*** rpmts_iter(%p) ts %p\n", s, s->ts);
Py_INCREF(s);
return (PyObject *)s;
}
-#endif
/**
* @todo Add TR_ADDED filter to iterator.
@@ -1352,7 +1350,6 @@ PyTypeObject rpmts_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
rpmts_doc, /* tp_doc */
-#if Py_TPFLAGS_HAVE_ITER
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
@@ -1372,7 +1369,6 @@ PyTypeObject rpmts_Type = {
(newfunc) rpmts_new, /* tp_new */
(freefunc) rpmts_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
/**