[xdebug-dev] svn: /xdebug/trunk/ xdebug.c

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Wed, 03 Nov 2010 21:55:34 +0000

derick Wed, 03 Nov 2010 21:55:34 +0000

Revision: http://svn.xdebug.org/cgi-bin/viewvc.cgi?view=rev&revision=3365&root=xdebug

Log:
- A small optimisation, that defers file length checking until it's really needed.

Changed paths:
    U xdebug/trunk/xdebug.c

Modified: xdebug/trunk/xdebug.c
===================================================================
--- xdebug/trunk/xdebug.c 2010-11-03 01:10:49 UTC (rev 3364)
+++ xdebug/trunk/xdebug.c 2010-11-03 21:55:34 UTC (rev 3365)
@@ -1743,7 +1743,6 @@
         function_stack_entry *fse;
         int lineno;
         char *file;
- int file_len = 0;
         int level = 0;
         TSRMLS_FETCH();

@@ -1754,7 +1753,6 @@
         lineno = EG(current_execute_data)->opline->lineno;

         file = op_array->filename;
- file_len = strlen(file);

         if (XG(do_code_coverage)) {
                 xdebug_count_line(file, lineno, 0, 0 TSRMLS_CC);
@@ -1814,6 +1812,7 @@
                         int break_ok;
                         int old_error_reporting;
                         zval retval;
+ int file_len = strlen(file);

                         for (le = XDEBUG_LLIST_HEAD(XG(context).line_breakpoints); le != NULL; le = XDEBUG_LLIST_NEXT(le)) {
                                 brk = XDEBUG_LLIST_VALP(le);
Received on Wed Nov 03 2010 - 21:55:34 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST