projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8360b11
)
Use tagValue() for name->tag lookups instead of manually walking tagtable.
author
Panu Matilainen
<pmatilai@redhat.com>
Fri, 13 Jul 2007 11:23:21 +0000
(14:23 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Fri, 13 Jul 2007 11:23:21 +0000
(14:23 +0300)
python/header-py.c
patch
|
blob
|
history
diff --git
a/python/header-py.c
b/python/header-py.c
index
709ecf2
..
dcfd98a
100644
(file)
--- 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;
}