We dont support ancient python versions...
This commit is contained in:
parent
dd5cfeec61
commit
ae1e7d8389
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
/* ---------- */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
/* ---------- */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
/* ---------- */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue