Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/xml_parser-py.c')
-rw-r--r--src/python/xml_parser-py.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/src/python/xml_parser-py.c b/src/python/xml_parser-py.c
index d9f05f9..1f9d981 100644
--- a/src/python/xml_parser-py.c
+++ b/src/python/xml_parser-py.c
@@ -708,89 +708,6 @@ py_xml_parse_updateinfo(G_GNUC_UNUSED PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-
-PyObject *
-py_xml_parse_main_metadata_together(G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
-{
- char *primary_filename;
- char *filelists_filename;
- char *other_filename;
- PyObject *py_newpkgcb, *py_pkgcb, *py_warningcb;
- CbData cbdata;
- GError *tmp_err = NULL;
- static char *kwlist[] = { "primary", "filelists", "other", "newpkgcb", "pkgcb",
- "warningcb", NULL };
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sssOOO:py_xml_parse_main_metadata_together", kwlist,
- &primary_filename, &filelists_filename, &other_filename, &py_newpkgcb,
- &py_pkgcb, &py_warningcb )) {
- return NULL;
- }
-
- if (!PyCallable_Check(py_newpkgcb) && py_newpkgcb != Py_None) {
- PyErr_SetString(PyExc_TypeError, "newpkgcb must be callable or None");
- return NULL;
- }
-
- if (!PyCallable_Check(py_pkgcb) && py_pkgcb != Py_None) {
- PyErr_SetString(PyExc_TypeError, "pkgcb must be callable or None");
- return NULL;
- }
-
- if (!PyCallable_Check(py_warningcb) && py_warningcb != Py_None) {
- PyErr_SetString(PyExc_TypeError, "warningcb must be callable or None");
- return NULL;
- }
-
- if (py_newpkgcb == Py_None && py_pkgcb == Py_None) {
- PyErr_SetString(PyExc_ValueError, "both pkgcb and newpkgcb cannot be None");
- return NULL;
- }
-
- Py_XINCREF(py_newpkgcb);
- Py_XINCREF(py_pkgcb);
- Py_XINCREF(py_warningcb);
-
- cr_XmlParserNewPkgCb ptr_c_newpkgcb = NULL;
- cr_XmlParserPkgCb ptr_c_pkgcb = NULL;
- cr_XmlParserWarningCb ptr_c_warningcb = NULL;
-
- if (py_newpkgcb != Py_None)
- ptr_c_newpkgcb = c_newpkgcb;
- if (py_pkgcb != Py_None)
- ptr_c_pkgcb = c_pkgcb;
- if (py_warningcb != Py_None)
- ptr_c_warningcb = c_warningcb;
-
- cbdata.py_newpkgcb = py_newpkgcb;
- cbdata.py_pkgcb = py_pkgcb;
- cbdata.py_warningcb = py_warningcb;
- cbdata.py_pkgs = PyDict_New();
-
- cr_xml_parse_main_metadata_together(primary_filename,
- filelists_filename,
- other_filename,
- ptr_c_newpkgcb,
- &cbdata,
- ptr_c_pkgcb,
- &cbdata,
- ptr_c_warningcb,
- &cbdata,
- &tmp_err);
-
- Py_XDECREF(py_newpkgcb);
- Py_XDECREF(py_pkgcb);
- Py_XDECREF(py_warningcb);
- Py_XDECREF(cbdata.py_pkgs);
-
- if (tmp_err) {
- nice_exception(&tmp_err, NULL);
- return NULL;
- }
-
- Py_RETURN_NONE;
-}
-
typedef struct {
PyObject_HEAD
cr_PkgIterator *pkg_iterator;