[DBD::Pg] Avoid expensive DBIS call in fetch

dbdpg-commits-gENoVmVU/[email protected] Tue, 13 Mar 2012 17:00:43 -0400
Newsgroups gmane.comp.db.postgresql.dbdpg.cvs
Message-ID <[email protected]>
Committed by Tim Bunce <[email protected]>

Avoid expensive DBIS call in fetch

---
 dbdimp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dbdimp.c b/dbdimp.c
index 84070d7..124dbb0 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -93,7 +93,7 @@ static int handle_old_async(pTHX_ SV * handle, imp_dbh_t * imp_dbh, const int as
 void dbd_init (dbistate_t *dbistate)
 {
 	dTHX;
-	DBIS = dbistate;
+	DBISTATE_INIT;
 }
 
 
@@ -3398,7 +3398,7 @@ AV * dbd_st_fetch (SV * sth, imp_sth_t * imp_sth)
 		return Nullav; /* we reached the last tuple */
 	}
 
-	av = DBIS->get_fbav(imp_sth);
+	av = DBIc_DBISTATE(imp_sth)->get_fbav(imp_sth);
 	num_fields = AvFILL(av)+1;
 	
 	chopblanks = (int)DBIc_has(imp_sth, DBIcf_ChopBlanks);
-- 
1.7.1