diff options
-rw-r--r-- | URPM.xs | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -487,10 +487,10 @@ return_list_uint_16(const Header header, rpmTag tag_name) { if (headerGet(header, tag_name, &list, HEADERGET_DEFAULT)) { int count = rpmtdCount(&list); int i; - uint16_t *list_ = list.data; EXTEND(SP, count); for(i = 0; i < count; i++) { - mPUSHs(newSViv(list_[i])); + rpmtdNext(&list); + mPUSHs(newSViv(rpmtdGetNumber(&list))); } rpmtdFreeData(&list); } @@ -554,25 +554,25 @@ return_list_tag(const URPM__Package pkg, rpmTag tag_name) { case RPM_INT32_TYPE: { int i; - int *r = (int *)list; EXTEND(SP, count); for (i=0; i < count; i++) { - mPUSHs(newSViv(r[i])); + rpmtdNext(&td); + mPUSHs(newSViv(rpmtdGetNumber(&td))); } } break; case RPM_STRING_TYPE: - mXPUSHs(newSVpv((char *) list, 0)); + mPUSHs(newSVpv(rpmtdGetString(&td), 0)); break; case RPM_BIN_TYPE: break; case RPM_STRING_ARRAY_TYPE: { int i; - char **s = (char **)list; EXTEND(SP, count); + rpmtdInit(&td); for (i = 0; i < count; i++) - mPUSHs(newSVpv(s[i], 0)); + mPUSHs(newSVpv(rpmtdNextString(&td), 0)); } break; case RPM_I18NSTRING_TYPE: |