Author: timbo
Date: Thu Jan 26 07:41:36 2006
New Revision: 2457
Modified:
dbi/trunk/Changes
dbi/trunk/Driver_xst.h
dbi/trunk/Perl.xs
Log:
Drivers can now use PERL_NO_GET_CONTEXT thanks to Gisle Aas.
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Thu Jan 26 07:41:36 2006
@@ -12,6 +12,7 @@ DBI::Changes - List of significant chang
Fixed for perl 5.8.0's more limited weaken() function.
Improved performance for thread-enabled perls thanks to Gisle Aas.
+ Drivers can now use PERL_NO_GET_CONTEXT thanks to Gisle Aas.
Changed DBI::ProfileData to be more forgiving of systems with
unstable clocks (where time may go backwards occasionally).
Clarified the 'Subclassing the DBI' docs.
Modified: dbi/trunk/Driver_xst.h
==============================================================================
--- dbi/trunk/Driver_xst.h (original)
+++ dbi/trunk/Driver_xst.h Thu Jan 26 07:41:36 2006
@@ -9,6 +9,7 @@
static SV *
dbixst_bounce_method(char *methname, int params)
{
+ dTHX;
/* XXX this 'magic' undoes the dMARK embedded in the dXSARGS of our caller
*/
/* so that the dXSARGS below can set things up as they were for our caller
*/
void *xxx = PL_markstack_ptr++;
@@ -46,6 +47,7 @@ dbdxst_bind_params(SV *sth, imp_sth_t *i
/* Handle binding supplied values to placeholders. */
/* items = one greater than the number of params */
/* ax = ax from calling sub, maybe adjusted to match items */
+ dTHX;
int i;
SV *idx;
if (items-1 != DBIc_NUM_PARAMS(imp_sth)
@@ -75,6 +77,7 @@ dbdxst_bind_params(SV *sth, imp_sth_t *i
static SV *
dbdxst_fetchall_arrayref(SV *sth, SV *slice, SV *batch_row_count)
{
+ dTHX;
D_imp_sth(sth);
SV *rows_rvav;
if (SvOK(slice)) { /* should never get here */
Modified: dbi/trunk/Perl.xs
==============================================================================
--- dbi/trunk/Perl.xs (original)
+++ dbi/trunk/Perl.xs Thu Jan 26 07:41:36 2006
@@ -2,6 +2,7 @@
that the Driver.xst mechansim doesn't have compile-time errors in it.
*/
+#define PERL_NO_GET_CONTEXT
#include "DBIXS.h"
#include "dbd_xsh.h"
@@ -38,6 +39,7 @@ struct imp_sth_st {
int /* just to test syntax of macros etc */
dbd_st_rows(SV *h, imp_sth_t *imp_sth)
{
+ dTHX;
DBIh_SET_ERR_CHAR(h, imp_sth, 0, 1, "err msg", "12345", Nullch);
return -1;
}