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 */
0, /* tp_new */
0, /* tp_free */
0, /* tp_is_gc */
-#endif
};
hdrObject * hdr_Wrap(Header h)
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 */
0, /* tp_new */
0, /* tp_free */
0, /* tp_is_gc */
-#endif
};
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 */
(newfunc) rpmds_new, /* tp_new */
(freefunc) rpmds_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
/* ---------- */
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 */
(newfunc) rpmfd_new, /* tp_new */
(freefunc) rpmfd_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
rpmfdObject * rpmfd_Wrap(FD_t fd)
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)
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 */
(newfunc) rpmfi_new, /* tp_new */
(freefunc) rpmfi_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
/* ---------- */
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 */
0, /* tp_new */
0, /* tp_free */
0, /* tp_is_gc */
-#endif
};
rpmmiObject * rpmmi_Wrap(rpmdbMatchIterator mi, PyObject *s)
{
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;
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)
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);
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;
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 */
(newfunc) rpmps_new, /* tp_new */
(freefunc) rpmps_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
/* ---------- */
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 */
0, /* tp_new */
0, /* tp_free */
0, /* tp_is_gc */
-#endif
};
rpmteObject * rpmte_Wrap(rpmte te)
return list;
}
-#if Py_TPFLAGS_HAVE_ITER
static PyObject *
rpmts_iter(rpmtsObject * s)
{
Py_INCREF(s);
return (PyObject *)s;
}
-#endif
/**
* @todo Add TR_ADDED filter to iterator.
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 */
(newfunc) rpmts_new, /* tp_new */
(freefunc) rpmts_free, /* tp_free */
0, /* tp_is_gc */
-#endif
};
/**