Tim Bunce <[EMAIL PROTECTED]> writes: > I agree. Any chance yould you patch lib/DBI/DBD.pm to add in a section > describing what driver authors need to do?
Is this enough? Index: lib/DBI/DBD.pm =================================================================== --- lib/DBI/DBD.pm (revision 2483) +++ lib/DBI/DBD.pm (working copy) @@ -1395,7 +1395,8 @@ #ifndef DRIVER_H_INCLUDED #define DRIVER_H_INCLUDED - #define NEED_DBIXS_VERSION 93 /* 93 for DBI versions 1.00 to 1.32 */ + #define NEED_DBIXS_VERSION 93 /* 93 for DBI versions 1.00 to 1.51+ */ + #define PERL_NO_GET_CONTEXT /* if used require DBI 1.51+ */ #include <DBIXS.h> /* installed by the DBI module */ @@ -1435,6 +1436,18 @@ Always read the notes in dbivport.h to check for any limitations in the emulation that you should be aware of. +With DBI v1.51 or better the driver might define PERL_NO_GET_CONTEXT +before F<DBIXS.h> is included to improve efficiency when running under +a thread enabled perl. If PERL_NO_GET_CONTEXT is defined, then every +function that call the Perl API will need to start out with a C<dTHX;> +declaration. You'll know which functions need this, because the C +compiler will complain that the undeclared identifier C<myperl> is +used. For driver private functions it is possible to gain even more +efficiency by replacing C<dTHX;> with C<pTHX_> prepended to the +parameter list and then C<aTHX_> prepended to the argument list where +the function is called. See L<perlguts/How multiple interpreters and +concurrency are supported> for additional information about +PERL_NO_GET_CONTEXT. =head2 Implementation header dbdimp.h
