From 7d4085496e0544bb61f3a61a6a2767a98b7c87f0 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 3 Nov 2010 21:55:34 +0000 Subject: [PATCH] - A small optimisation, that defers file length checking until it's really needed. SVN Rev: 3365 --- xdebug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xdebug.c b/xdebug.c index 7df35e1c5..d5bb7d503 100644 --- a/xdebug.c +++ b/xdebug.c @@ -1743,7 +1743,6 @@ ZEND_DLEXPORT void xdebug_statement_call(zend_op_array *op_array) function_stack_entry *fse; int lineno; char *file; - int file_len = 0; int level = 0; TSRMLS_FETCH(); @@ -1754,7 +1753,6 @@ ZEND_DLEXPORT void xdebug_statement_call(zend_op_array *op_array) 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 @@ ZEND_DLEXPORT void xdebug_statement_call(zend_op_array *op_array) 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);