--- PApp-SQL/SQL.xs 2001/04/22 14:38:28 1.5 +++ PApp-SQL/SQL.xs 2001/08/11 02:46:16 1.8 @@ -81,8 +81,6 @@ lru_hash; - /*fprintf (stderr, "F: %08lx %s\n", hash, SvPV_nolen (sql));/*D*/ - n = &lru_list; do { n = n->next; @@ -114,8 +112,6 @@ lru_list.prev = n->prev; n->prev->next = &lru_list; - /*fprintf (stderr, "N: %s\n", SvPV_nolen (n->sql));/*D*/ - SvREFCNT_dec (n->dbh); SvREFCNT_dec (n->sql); SvREFCNT_dec (n->sth); @@ -137,8 +133,6 @@ lru_hash; - /*fprintf (stderr, "S: %08lx %s\n", hash, SvPV_nolen (sql));/*D*/ - lru_size++; if (lru_size > lru_maxsize) lru_nukeone (); @@ -168,7 +162,9 @@ static GV *sql_exec; static GV *DBH; -static SV *sv_prepare, *sv_execute, *sv_bind_columns, *sv_fetchrow_arrayref, *sv_finish; +static SV *sv_prepare, *sv_execute, *sv_bind_columns, + *sv_fetchrow_arrayref, *sv_fetchall_arrayref, + *sv_finish; #define newconstpv(str) newSVpvn ((str), sizeof (str)) @@ -187,6 +183,7 @@ sv_execute = newconstpv ("execute"); sv_bind_columns = newconstpv ("bind_columns"); sv_fetchrow_arrayref = newconstpv ("fetchrow_arrayref"); + sv_fetchall_arrayref = newconstpv ("fetchall_arrayref"); sv_finish = newconstpv ("finish"); } @@ -271,7 +268,7 @@ sv_catsv (neu, sql); sv_catpv (neu, " limit 1"); sql = neu; - ix -= 6; /* sql_fetch */ + ix -= 4; /* sql_fetch */ } /* check cache for existing statement handle */ @@ -403,7 +400,7 @@ PUSHMARK (SP); XPUSHs (sth); PUTBACK; - count = call_sv (sv_fetchrow_arrayref, G_METHOD | G_SCALAR); + count = call_sv (sv_fetchall_arrayref, G_METHOD | G_SCALAR); SPAGAIN; if (count != 1) @@ -418,7 +415,7 @@ if (count) { - int columns = AvFILL ((AV *)SvRV (AvARRAY(av)[0])) + 1; /* columns? */ + int columns = AvFILL ((AV *) SvRV (AvARRAY (av)[0])) + 1; /* columns? */ EXTEND (SP, count); if (columns == 1)