[svn:dbi] r15105 - dbi/trunk

[email protected] Fri, 27 Jan 2012 07:14:22 -0800 (PST)
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: timbo
Date: Fri Jan 27 07:14:21 2012
New Revision: 15105

Modified:
   dbi/trunk/DBI.xs

Log:
simplify use_xsbypass env var logic

Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs	(original)
+++ dbi/trunk/DBI.xs	Fri Jan 27 07:14:21 2012
@@ -18,18 +18,13 @@
 
 #define MY_VERSION "DBI(" XS_VERSION ")"
 
-#if (defined USE_THREADS || defined PERL_CAPI || defined PERL_OBJECT)
 /* The XS dispatcher code can optimize calls to XS driver methods,
  * bypassing the usual call_sv() and argument handling overheads.
- * For many years this bypass was disabled for threaded (etc) perls.
- * However, the reasons have been lost in the mists of time, and it
- * seems to work fine. So it's now enabled by default. Just-in-case
- * there's an (undocumented) way to disable it by setting an env var.
+ * Just-in-case it causes problems there's an (undocumented) way
+ * to disable it by setting an env var.
  */
-static int use_xsbypass = (getenv("PERL_DBI_NO_XSBYPASS") ? 0 : 1);
-#else
-static int use_xsbypass = 1;
-#endif
+static int use_xsbypass = (getenv("PERL_DBI_XSBYPASS") ? atoi(getenv("PERL_DBI_XSBYPASS")) : 1);
+
 #ifndef CvISXSUB
 #define CvISXSUB(sv) CvXSUB(sv)
 #endif