Various debugging

CVS patchset: 4775
CVS date: 2001/05/12 11:40:27
This commit is contained in:
rjray 2001-05-12 11:40:27 +00:00
parent 27009dd00b
commit 1da20d37d8
3 changed files with 12 additions and 6 deletions

View File

@ -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;

View File

@ -5,7 +5,7 @@
#include <fcntl.h>
#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 */

View File

@ -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();