diff options
-rw-r--r-- | RPM4/src/Makefile.PL | 1 | ||||
-rw-r--r-- | RPM4/src/RPM4.xs | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/RPM4/src/Makefile.PL b/RPM4/src/Makefile.PL index 527fb47..025f5c8 100644 --- a/RPM4/src/Makefile.PL +++ b/RPM4/src/Makefile.PL @@ -39,6 +39,7 @@ print $FH ' * $Id$' . "\n"; print $FH " */\n\n"; print $FH "#ifndef RPMVERSION_H\n#define RPMVERSION_H\n\n"; foreach (qw( + 4.12.0 4.12.90 4.15.0 )) { diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs index dbbbd28..5000e7e 100644 --- a/RPM4/src/RPM4.xs +++ b/RPM4/src/RPM4.xs @@ -1957,18 +1957,27 @@ void Te_files(Te) rpmte Te PREINIT: +#if defined(RPM4_12_0) rpmfiles Files; +#endif rpmfi fi; PPCODE: +#if defined(RPM4_12_0) Files = rpmteFiles(Te); fi = rpmfilesIter(Files, RPMFI_ITER_FWD); if (fi != NULL && rpmfiNext(fi) >= 0) { +#else + fi = rpmteFI(Te); + if ((fi = rpmfiInit(fi, 0)) != NULL && rpmfiNext(fi) >= 0) { +#endif mXPUSHs(sv_setref_pv(newSVpvs(""), bless_rpmfi, fi)); #ifdef HDRPMMEM PRINTF_NEW(bless_rpmfi, Files, Files->nrefs); #endif } +#if defined(RPM4_12_0) rpmfilesFree(Files); +#endif MODULE = RPM4 PACKAGE = RPM4 |