develooper Front page | perl.dbi.changes | Postings from March 2012

[svn:dbi] r15198 - dbi/trunk

From:
timbo
Date:
March 2, 2012 07:43
Subject:
[svn:dbi] r15198 - dbi/trunk
Message ID:
20120302154300.379A6184B1B@xx12.develooper.com
Author: timbo
Date: Fri Mar  2 07:43:00 2012
New Revision: 15198

Modified:
   dbi/trunk/DBI.xs

Log:
[PATCH 5/8] XS_DBI_dispatch: eliminate is_FETCH (David Mitchell)

Since its now easy to test for a particular method name, its not worth
saving it in a boolean just to be used 2-3 times.



Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs	(original)
+++ dbi/trunk/DBI.xs	Fri Mar  2 07:43:00 2012
@@ -3119,7 +3119,6 @@
     I32 trace_flags = DBIS->debug;      /* local copy may change during dispatch */
     I32 trace_level = (trace_flags & DBIc_TRACE_LEVEL_MASK);
     int is_DESTROY;
-    int is_FETCH;
     meth_types meth_type;
     int is_unrelated_to_Statement = 0;
     int keep_error = FALSE;
@@ -3522,7 +3521,7 @@
 
     /* The "quick_FETCH" logic...                                       */
     /* Shortcut for fetching attributes to bypass method call overheads */
-    if ( (is_FETCH = (meth_type == methtype_FETCH)) && !DBIc_COMPAT(imp_xxh)) {
+    if (meth_type == methtype_FETCH && !DBIc_COMPAT(imp_xxh)) {
         STRLEN kl;
         const char *key = SvPV(st1, kl);
         SV **attr_svp;
@@ -3550,7 +3549,7 @@
     else {
 #ifdef DBI_save_hv_fetch_ent
         HE save_mh;
-        if (is_FETCH)
+        if (meth_type == methtype_FETCH)
             save_mh = PL_hv_fetch_ent_mh; /* XXX nested tied FETCH bug17575 workaround */
 #endif
 
@@ -3692,7 +3691,7 @@
         ax = (SP - PL_stack_base) + 1;
 
 #ifdef DBI_save_hv_fetch_ent
-        if (is_FETCH)
+        if (meth_type == methtype_FETCH)
             PL_hv_fetch_ent_mh = save_mh;       /* see start of block */
 #endif
     }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About