diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-07-13 14:23:21 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-07-13 14:23:21 +0300 |
commit | c57831dc7d62ec3f2119bb955e3fb6ef7a205206 (patch) | |
tree | 6ee1f68136b5a361b54b536c3b5c20a2b20f61a9 /python/header-py.c | |
parent | 8360b1147cb2ad146903ff0fafe1a1f5a5f38d6f (diff) | |
download | rpm-c57831dc7d62ec3f2119bb955e3fb6ef7a205206.tar.gz rpm-c57831dc7d62ec3f2119bb955e3fb6ef7a205206.tar.bz2 rpm-c57831dc7d62ec3f2119bb955e3fb6ef7a205206.zip |
Use tagValue() for name->tag lookups instead of manually walking tagtable.
Diffstat (limited to 'python/header-py.c')
-rw-r--r-- | python/header-py.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/python/header-py.c b/python/header-py.c index 709ecf23d..dcfd98af5 100644 --- a/python/header-py.c +++ b/python/header-py.c @@ -377,15 +377,12 @@ static void hdr_dealloc(hdrObject * s) long tagNumFromPyObject (PyObject *item) { char * str; - int i; if (PyInt_Check(item)) { return PyInt_AsLong(item); } else if (PyString_Check(item)) { str = PyString_AsString(item); - for (i = 0; i < rpmTagTableSize; i++) - if (!xstrcasecmp(rpmTagTable[i].name + 7, str)) break; - if (i < rpmTagTableSize) return rpmTagTable[i].val; + return tagValue(str); } return -1; } |