[svn:dbi] r15106 - dbi/trunk

[email protected] Fri, 27 Jan 2012 07:40:00 -0800 (PST)
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: timbo
Date: Fri Jan 27 07:39:59 2012
New Revision: 15106

Modified:
   dbi/trunk/DBI.xs

Log:
oops, fix that to avoid non-constant expression

Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs	(original)
+++ dbi/trunk/DBI.xs	Fri Jan 27 07:39:59 2012
@@ -23,7 +23,7 @@
  * 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_XSBYPASS") ? atoi(getenv("PERL_DBI_XSBYPASS")) : 1);
+static int use_xsbypass = 1; /* set in dbi_bootinit() */
 
 #ifndef CvISXSUB
 #define CvISXSUB(sv) CvXSUB(sv)
@@ -464,6 +464,9 @@
     gv_fetchpv("DBI::errstr", GV_ADDMULTI, SVt_PV);
     gv_fetchpv("DBI::lasth",  GV_ADDMULTI, SVt_PV);
     gv_fetchpv("DBI::rows",   GV_ADDMULTI, SVt_PV);
+
+    if (getenv("PERL_DBI_XSBYPASS"))
+        use_xsbypass = atoi(getenv("PERL_DBI_XSBYPASS"));
 }