Author: turnstep
Date: Tue Mar  4 07:26:05 2008
New Revision: 10877

Modified:
   DBD-Pg/trunk/dbdimp.c

Log:
Make second arg to pg_error an int, since we're calling that way in places 
anyway.


Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c       (original)
+++ DBD-Pg/trunk/dbdimp.c       Tue Mar  4 07:26:05 2008
@@ -65,7 +65,7 @@
        (SvROK(h) && SvTYPE(SvRV(h)) == SVt_PVHV &&                             
        \
         SvRMAGICAL(SvRV(h)) && (SvMAGIC(SvRV(h)))->mg_type == 'P')
 
-static void pg_error(pTHX_ SV *h, ExecStatusType error_num, const char 
*error_msg);
+static void pg_error(pTHX_ SV *h, int error_num, const char *error_msg);
 static void pg_warn (void * arg, const char * message);
 static ExecStatusType _result(pTHX_ imp_dbh_t *imp_dbh, const char *sql);
 static ExecStatusType _sqlstate(pTHX_ imp_dbh_t *imp_dbh, PGresult *result);
@@ -181,7 +181,7 @@
        connstatus = PQstatus(imp_dbh->conn);
        if (CONNECTION_OK != connstatus) {
                TRACE_PQERRORMESSAGE;
-               pg_error(aTHX_ dbh, (ExecStatusType)connstatus, 
PQerrorMessage(imp_dbh->conn));
+               pg_error(aTHX_ dbh, connstatus, PQerrorMessage(imp_dbh->conn));
                strncpy(imp_dbh->sqlstate, "08006", 6); /* "CONNECTION FAILURE" 
*/
                TRACE_PQFINISH;
                PQfinish(imp_dbh->conn);
@@ -268,7 +268,7 @@
 /* ================================================================== */
 
 /* Database specific error handling. */
-static void pg_error (pTHX_ SV * h, ExecStatusType error_num, const char * 
error_msg)
+static void pg_error (pTHX_ SV * h, int error_num, const char * error_msg)
 {
        D_imp_xxh(h);
        size_t error_len;
@@ -797,7 +797,7 @@
                        /* Default to "1" if an invalid value is passed in */
                        imp_dbh->pg_errorlevel = 0==newval ? 0 : 2==newval ? 2 
: 1;
                        TRACE_PQSETERRORVERBOSITY;
-                       (void)PQsetErrorVerbosity(imp_dbh->conn, 
imp_dbh->pg_errorlevel);
+                       (void)PQsetErrorVerbosity(imp_dbh->conn, 
(PGVerbosity)imp_dbh->pg_errorlevel);
                        if (TRACE5)
                                TRC(DBILOGFP, "%sReset error verbosity to 
%d\n", THEADER, imp_dbh->pg_errorlevel);
                        retval = 1;

Reply via email to