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 | |
parent | 4adbd80d74a551019494c49d64cf33d2a36b4ffe (diff) | |
download | rpm-4352ef4a987e56b69f91be767427fae1593eb310.tar.gz |
Updated
CVS patchset: 3160
CVS date: 1999/07/14 17:23:30
Diffstat (limited to 'perl')
-rw-r--r-- | perl/ChangeLog | 3 | ||||
-rw-r--r-- | perl/junk.xs | 2 | ||||
-rw-r--r-- | perl/rpm.xs | 62 | ||||
-rw-r--r-- | perl/typemap | 2 |
4 files changed, 54 insertions, 15 deletions
diff --git a/perl/ChangeLog b/perl/ChangeLog index bd6559216..48fc68ce7 100644 --- a/perl/ChangeLog +++ b/perl/ChangeLog @@ -1,5 +1,8 @@ 1999-07-14 Cristian Gafton <gafton@redhat.com> + * rpm.xs: Take the count return value into consideration + when processing int return types + * test.pl: Added test for the number fo tags and the number of files in the test package diff --git a/perl/junk.xs b/perl/junk.xs index 0513a0fba..a3f023768 100644 --- a/perl/junk.xs +++ b/perl/junk.xs @@ -2,7 +2,7 @@ * This file includes misc functions that were once implemented and retired * later in the process * - * $Id: junk.xs,v 1.1 1999/07/14 16:52:52 jbj Exp $ + * $Id: junk.xs,v 1.2 1999/07/14 17:23:30 gafton Exp $ */ SV * 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)); diff --git a/perl/typemap b/perl/typemap index 4413d2bc6..c3e88c6e9 100644 --- a/perl/typemap +++ b/perl/typemap @@ -1,4 +1,4 @@ -/* $Id: typemap,v 1.1 1999/07/14 16:52:52 jbj Exp $ */ +/* $Id: typemap,v 1.2 1999/07/14 17:23:30 gafton Exp $ */ TYPEMAP |