diff options
author | gafton <devnull@localhost> | 1999-07-14 17:23:30 +0000 |
---|---|---|
committer | gafton <devnull@localhost> | 1999-07-14 17:23:30 +0000 |
commit | 4352ef4a987e56b69f91be767427fae1593eb310 (patch) | |
tree | 9d9ddd758d9bff23253408223917f0f271996318 /perl/rpm.xs | |
parent | 4adbd80d74a551019494c49d64cf33d2a36b4ffe (diff) | |
download | rpm-4352ef4a987e56b69f91be767427fae1593eb310.tar.gz rpm-4352ef4a987e56b69f91be767427fae1593eb310.tar.bz2 rpm-4352ef4a987e56b69f91be767427fae1593eb310.zip |
Updated
CVS patchset: 3160
CVS date: 1999/07/14 17:23:30
Diffstat (limited to 'perl/rpm.xs')
-rw-r--r-- | perl/rpm.xs | 62 |
1 files changed, 49 insertions, 13 deletions
diff --git a/perl/rpm.xs b/perl/rpm.xs index 463dca287..1eb8fc0fe 100644 --- a/perl/rpm.xs +++ b/perl/rpm.xs @@ -1,7 +1,7 @@ /* * Perl interface to rpmlib * - * $Id: rpm.xs,v 1.1 1999/07/14 16:52:52 jbj Exp $ + * $Id: rpm.xs,v 1.2 1999/07/14 17:23:30 gafton Exp $ */ #include "EXTERN.h" @@ -77,16 +77,28 @@ CODE: if (rc != 0) { switch(type) { case RPM_CHAR_TYPE: - av_push(array, newSViv((char) (int) value)); + while (count-- > 0) { + av_push(array, newSViv((char) (int) value)); + value++; + } break; case RPM_INT8_TYPE: - av_push(array, newSViv((int_8) (int) value)); + while (count-- > 0) { + av_push(array, newSViv((int_8) (int) value)); + value++; + } break; case RPM_INT16_TYPE: - av_push(array, newSViv((int_16) (int) value)); + while (count-- > 0) { + av_push(array, newSViv((int_16) (int) value)); + value++; + } break; case RPM_INT32_TYPE: - av_push(array, newSViv((int_32)value)); + while (count-- > 0) { + av_push(array, newSViv((int_32)value)); + value++; + } break; case RPM_STRING_TYPE: av_push(array, newSVpv((char *)value, 0)); @@ -131,16 +143,28 @@ HeaderItemByNameRef(header, tag) if (rc != 0) { switch(type) { case RPM_CHAR_TYPE: - av_push(array, newSViv((char) (int) value)); + while (count-- > 0) { + av_push(array, newSViv((char) (int) value)); + value++; + } break; case RPM_INT8_TYPE: - av_push(array, newSViv((int_8) (int) value)); + while (count-- > 0) { + av_push(array, newSViv((int_8) (int) value)); + value++; + } break; case RPM_INT16_TYPE: - av_push(array, newSViv((int_16) (int) value)); + while (count-- > 0) { + av_push(array, newSViv((int_16) (int) value)); + value++; + } break; case RPM_INT32_TYPE: - av_push(array, newSViv((int_32)value)); + while (count-- > 0) { + av_push(array, newSViv((int_32)value)); + value++; + } break; case RPM_STRING_TYPE: av_push(array, newSVpv((char *)value, 0)); @@ -181,16 +205,28 @@ HeaderListRef(header) array = newAV(); switch(type) { case RPM_CHAR_TYPE: - av_push(array, newSViv((char) (int) value)); + while (count-- > 0) { + av_push(array, newSViv((char) (int) value)); + value++; + } break; case RPM_INT8_TYPE: - av_push(array, newSViv((int_8) (int) value)); + while (count-- > 0) { + av_push(array, newSViv((int_8) (int) value)); + value++; + } break; case RPM_INT16_TYPE: - av_push(array, newSViv((int_16) (int) value)); + while (count-- > 0) { + av_push(array, newSViv((int_16) (int) value)); + value++; + } break; case RPM_INT32_TYPE: - av_push(array, newSViv((int_32)value)); + while (count-- > 0) { + av_push(array, newSViv((int_32)value)); + value++; + } break; case RPM_STRING_TYPE: av_push(array, newSVpv((char *)value, 0)); |