summaryrefslogtreecommitdiff
path: root/python/header-py.h
blob: ad16e013c4a0f0230ff85fb61e7e85192a66c91f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef RPMPYTHON_HEADER
#define RPMPYTHON_HEADER

#include <rpm/rpmtypes.h>

typedef struct hdrObject_s hdrObject;

extern PyTypeObject hdr_Type;

#define hdrObject_Check(v)	((v)->ob_type == &hdr_Type)

#define DEPRECATED_METHOD \
    static int _warn = 0; \
    if (!_warn) PyErr_Warn(PyExc_DeprecationWarning, "method is deprecated"); \
    _warn = 1;

extern PyObject * pyrpmError;

PyObject * hdr_Wrap(PyTypeObject *subtype, Header h);

int hdrFromPyObject(PyObject *item, Header *h);

int tagNumFromPyObject (PyObject *item, rpmTag *tagp);

PyObject * labelCompare (PyObject * self, PyObject * args);
PyObject * versionCompare (PyObject * self, PyObject * args, PyObject * kwds);
PyObject * rpmMergeHeadersFromFD(PyObject * self, PyObject * args, PyObject * kwds);
int rpmMergeHeaders(PyObject * list, FD_t fd, int matchTag);
PyObject * rpmSingleHeaderFromFD(PyObject * self, PyObject * args, PyObject * kwds);
PyObject * hdrLoad(PyObject * self, PyObject * args, PyObject * kwds);

#endif