From eb6546239a4319aac31e31e39acd3db0045a22d0 Mon Sep 17 00:00:00 2001 From: cturner Date: Tue, 9 Dec 2003 16:54:59 +0000 Subject: [PATCH] changes to make it compile once again on gcc 2.x; some naughtiness crept in CVS patchset: 6967 CVS date: 2003/12/09 16:54:59 --- perl-RPM2/RPM2.xs | 5 ++--- perl-RPM2/typemap | 14 ++------------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/perl-RPM2/RPM2.xs b/perl-RPM2/RPM2.xs index 98b228fd8..03a8621b2 100644 --- a/perl-RPM2/RPM2.xs +++ b/perl-RPM2/RPM2.xs @@ -280,6 +280,7 @@ _create_transaction(vsflags) int vsflags PREINIT: rpmts ret; + SV *h_sv; PPCODE: /* Looking at librpm, it does not look like this ever returns error (though maybe it should). @@ -290,8 +291,6 @@ _create_transaction(vsflags) rpmtsSetVSFlags(ret, vsflags); /* Convert and throw the results on the stack */ - SV *h_sv; - EXTEND(SP, 1); h_sv = sv_newmortal(); @@ -366,6 +365,7 @@ _iterator_next(i) rpmdbMatchIterator i PREINIT: Header ret; + SV * h_sv; unsigned int offset; PPCODE: ret = rpmdbNextIterator(i); @@ -377,7 +377,6 @@ _iterator_next(i) offset = 0; EXTEND(SP, 2); - SV * h_sv; h_sv = sv_newmortal(); sv_setref_pv(h_sv, "RPM2::C::Header", (void *)ret); PUSHs(h_sv); diff --git a/perl-RPM2/typemap b/perl-RPM2/typemap index 4570844f7..9e6ee0511 100644 --- a/perl-RPM2/typemap +++ b/perl-RPM2/typemap @@ -3,8 +3,8 @@ rpmdb O_OBJECT_rpmdb rpmdbMatchIterator O_OBJECT_rpmmi Header O_OBJECT_header rpmts O_OBJECT_rpmts -rpmprobFilterFlags O_OBJECT_rpmprob_filter_flags -rpmElementType O_OBJECT_rpm_element_type +rpmprobFilterFlags T_IV +rpmElementType T_IV INPUT O_OBJECT_rpmdb @@ -39,12 +39,6 @@ O_OBJECT_rpmts XSRETURN_UNDEF; } -O_OBJECT_rpmprob_filter_flags - $var = ($type) SvIV($arg); - -O_OBJECT_rpm_element_type - $var = ($type) SvIV($arg); - OUTPUT O_OBJECT_rpmdb sv_setref_pv( $arg, "RPM2::C::DB", (void*)$var ); @@ -54,7 +48,3 @@ O_OBJECT_header sv_setref_pv( $arg, "RPM2::C::Header", (void*)$var ); O_OBJECT_rpmts sv_setref_pv( $arg, "RPM2::C::Transaction", (void*)$var ); -O_OBJECT_rpmprob_filter_flags - sv_setiv($arg, (IV)$var); -O_OBJECT_rpm_element_type - sv_setiv($arg, (IV)$var);