diff --git a/Perl-RPM/RPM/Constants.xs b/Perl-RPM/RPM/Constants.xs index 056243013..ffbb70048 100644 --- a/Perl-RPM/RPM/Constants.xs +++ b/Perl-RPM/RPM/Constants.xs @@ -4,7 +4,7 @@ #include "RPM.h" -static char * const rcsid = "$Id: Constants.xs,v 1.9 2001/04/29 22:44:54 rjray Exp $"; +static char * const rcsid = "$Id: Constants.xs,v 1.10 2001/05/12 11:40:27 rjray Exp $"; static int constant(pTHX_ char *name) { @@ -171,7 +171,7 @@ static int constant(pTHX_ char *name) if (strEQ(name, "RPMERR_PKGINSTALLED")) return RPMERR_PKGINSTALLED; if (strEQ(name, "RPMERR_READ") || strEQ(name, "RPMERR_READERROR")) -#if (RPM_VERSION > 0x040002) +#if (RPM_VERSION >= 0x040002) return RPMERR_READ; #else return RPMERR_READERROR; diff --git a/Perl-RPM/RPM/Database.xs b/Perl-RPM/RPM/Database.xs index 766e7860c..7f2e9f809 100644 --- a/Perl-RPM/RPM/Database.xs +++ b/Perl-RPM/RPM/Database.xs @@ -5,7 +5,7 @@ #include #include "RPM.h" -static char * const rcsid = "$Id: Database.xs,v 1.13 2001/03/08 06:11:20 rjray Exp $"; +static char * const rcsid = "$Id: Database.xs,v 1.14 2001/05/12 11:40:27 rjray Exp $"; /* rpmdb_TIEHASH @@ -111,7 +111,7 @@ SV* rpmdb_FETCH(pTHX_ RPM__Database self, SV* key) thus cached on the hash itself */ svp = hv_fetch(dbstruct->storage, (char *)name, namelen, FALSE); if (svp && SvROK(*svp)) - return newRV(SvRV(*svp)); + return newSVsv(*svp); #if RPM_MAJOR < 4 /* This is the old (3.0.4+) way of setting up and searching */ diff --git a/Perl-RPM/RPM/Error.xs b/Perl-RPM/RPM/Error.xs index 27de50af6..a40e022aa 100644 --- a/Perl-RPM/RPM/Error.xs +++ b/Perl-RPM/RPM/Error.xs @@ -4,10 +4,16 @@ #include "RPM.h" -static char * const rcsid = "$Id: Error.xs,v 1.2 2000/10/05 04:48:59 rjray Exp $"; +static char * const rcsid = "$Id: Error.xs,v 1.3 2001/05/12 11:40:27 rjray Exp $"; static CV* err_callback; +#if (RPM_VERSION >= 0x040002) +# define ERR_STR_CONST const +#else +# define ERR_STR_CONST +#endif + /* This was static, but it needs to be accessible from other modules, as well. */ @@ -23,7 +29,7 @@ static void rpm_catch_errors(void) our thread context here */ dTHX; int error_code; - char* error_string; + ERR_STR_CONST char* error_string; error_code = rpmErrorCode(); error_string = rpmErrorString();