{
PyObject * keys = PyList_New(0);
HeaderIterator hi = headerInitIterator(s->h);
- rpmTag tag;
+ rpmTagVal tag;
while ((tag = headerNextTag(hi)) != RPMTAG_NOT_FOUND) {
PyObject *to = PyInt_FromLong(tag);
static int hdrContains(hdrObject *s, PyObject *pytag)
{
- rpmTag tag;
+ rpmTagVal tag;
if (!tagNumFromPyObject(pytag, &tag)) return -1;
return headerIsEntry(s->h, tag);
/* Backwards compatibility. Flags argument is just a dummy and discarded. */
static PyObject * hdr_dsFromHeader(PyObject * s, PyObject * args, PyObject * kwds)
{
- rpmTag tag = RPMTAG_REQUIRENAME;
+ rpmTagVal tag = RPMTAG_REQUIRENAME;
rpmsenseFlags flags = 0;
char * kwlist[] = {"to", "flags", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O&i:dsFromHeader", kwlist,
static PyObject * hdr_iternext(hdrObject *s)
{
PyObject *res = NULL;
- rpmTag tag;
+ rpmTagVal tag;
if (s->hi == NULL) s->hi = headerInitIterator(s->h);
return 1;
}
-int tagNumFromPyObject (PyObject *item, rpmTag *tagp)
+int tagNumFromPyObject (PyObject *item, rpmTagVal *tagp)
{
- rpmTag tag = RPMTAG_NOT_FOUND;
+ rpmTagVal tag = RPMTAG_NOT_FOUND;
PyObject *str = NULL;
if (PyInt_Check(item)) {
return 1;
}
-static PyObject * hdrGetTag(Header h, rpmTag tag)
+static PyObject * hdrGetTag(Header h, rpmTagVal tag)
{
PyObject *res = NULL;
struct rpmtd_s td;
return rc;
}
-static int validData(rpmTag tag, rpmTagType type, rpmTagReturnType retype, PyObject *value)
+static int validData(rpmTagVal tag, rpmTagType type, rpmTagReturnType retype, PyObject *value)
{
rpmTagClass tclass = rpmTagGetClass(tag);
int valid = 1;
return valid;
}
-static int hdrAppendItem(Header h, rpmTag tag, rpmTagType type, PyObject *item)
+static int hdrAppendItem(Header h, rpmTagVal tag, rpmTagType type, PyObject *item)
{
int rc = 0;
return rc;
}
-static int hdrPutTag(Header h, rpmTag tag, PyObject *value)
+static int hdrPutTag(Header h, rpmTagVal tag, PyObject *value)
{
rpmTagType type = rpmTagGetTagType(tag);
rpmTagReturnType retype = rpmTagGetReturnType(tag);
static PyObject * hdr_subscript(hdrObject * s, PyObject * item)
{
- rpmTag tag;
+ rpmTagVal tag;
if (!tagNumFromPyObject(item, &tag)) return NULL;
return hdrGetTag(s->h, tag);
static int hdr_ass_subscript(hdrObject *s, PyObject *key, PyObject *value)
{
- rpmTag tag;
+ rpmTagVal tag;
if (!tagNumFromPyObject(key, &tag)) return -1;
if (value == NULL) {
{
PyObject *res = PyObject_GenericGetAttr((PyObject *) s, n);
if (res == NULL) {
- rpmTag tag;
+ rpmTagVal tag;
if (tagNumFromPyObject(n, &tag)) {
PyErr_Clear();
res = hdrGetTag(s->h, tag);
{
Header h;
HeaderIterator hi;
- rpmTag newMatch, oldMatch;
+ rpmTagVal newMatch, oldMatch;
hdrObject * hdr;
rpm_count_t count = 0;
int rc = 1; /* assume failure */
/* XXX lkey *must* be a 32 bit integer, int "works" on all known platforms. */
int lkey = 0;
int len = 0;
- rpmTag tag = RPMDBI_PACKAGES;
+ rpmDbiTagVal tag = RPMDBI_PACKAGES;
char * kwlist[] = {"tagNumber", "key", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O&O:Match", kwlist,
static PyObject *
rpmts_Keys(rpmtsObject * s, PyObject * args, PyObject * kwds)
{
- rpmTag tag;
+ rpmDbiTagVal tag;
PyObject *mio = NULL;
char * kwlist[] = {"tag", NULL};