[xdebug-dev] xdebug xdebug/xdebug_code_coverage.c - Added return values for xdebug_start_code_coverage() and

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Thu, 11 Dec 2008 13:29:44 +0100

Date: Thu Dec 11 13:29:43 CET 2008
User: Derick Rethans
Directory: xdebug

Log Message:
[0.25]
- Added return values for xdebug_start_code_coverage() and
  xdebug_stop_code_coverage() to indicate whether the action was succesfull.
  xdebug_start_code_coverage() will return TRUE if the call enabled code
  coverage, and FALSE if it was already enabled. xdebug_stop_code_coverage()
  will return FALSE when code coverage wasn't started yet and TRUE if it was
  turned on.

Modified files:
           xdebug/xdebug_code_coverage.c (version: 1.45)

[FILE: /xdebug/xdebug_code_coverage.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- xdebug/xdebug_code_coverage.c:1.44 Wed May 21 12:30:34 2008 GMT
+++ xdebug/xdebug_code_coverage.c Thu Dec 11 11:29:43 2008 GMT
@@ -334,9 +334,11 @@
         XG(code_coverage_dead_code_analysis) = (options & XDEBUG_CC_OPTION_DEAD_CODE);
 
         if (XG(extended_info)) {
+ RETVAL_BOOL(!XG(do_code_coverage));
                 XG(do_code_coverage) = 1;
         } else {
                 php_error(E_WARNING, "You can only use code coverage when you leave the setting of 'xdebug.extended_info' to the default '1'.");
+ RETVAL_BOOL(0);
         }
 }
 
@@ -353,7 +355,9 @@
                         XG(code_coverage) = xdebug_hash_alloc(32, xdebug_coverage_file_dtor);
                 }
                 XG(do_code_coverage) = 0;
+ RETURN_TRUE;
         }
+ RETURN_FALSE;
 }
 
 
Received on Thu Dec 11 2008 - 13:29:49 GMT

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