while ((tname = rpmtdNextString(names))) {
sname = tname + strlen("RPMTAG_");
if (rpmIsVerbose()) {
- rpmTag tag = rpmTagGetValue(tname);
+ rpmTag tag = rpmTagGetValue(sname);
rpmTagType type = rpmTagGetType(tag) & RPM_MASK_TYPE;
fprintf(fp, "%-20s %6d", sname, tag);
if (type > RPM_NULL_TYPE && type <= RPM_MAX_TYPE)
#endif
dict = PyDict_New();
- { const char *tname;
+ { const char *tname, *sname;
rpmtd names = rpmTagGetNames(1);
while ((tname = rpmtdNextString(names))) {
- tag = PyInt_FromLong(rpmTagGetValue(tname));
+ sname = tname + strlen("RPMTAG_");
+ tag = PyInt_FromLong(rpmTagGetValue(sname));
PyDict_SetItemString(d, tname, tag);
Py_DECREF(tag);
- o = PyString_FromString(tname + strlen("RPMTAG_"));
+ o = PyString_FromString(sname);
PyDict_SetItem(dict, tag, o);
Py_DECREF(o);
}