diff options
| author | Derick Rethans <derick@php.net> | 2002-11-20 19:44:37 +0000 |
|---|---|---|
| committer | Derick Rethans <derick@php.net> | 2002-11-20 19:44:37 +0000 |
| commit | 33d0e4e1fbacd3acce5fab6bd3cc4c120223c46f (patch) | |
| tree | c6c058036addc9a8d2aa5750fc86f3e45ca0b4ec | |
| parent | 7ce4bc76bf6e296bf4feb8efe0d56716cad0ec23 (diff) | |
| download | php-git-33d0e4e1fbacd3acce5fab6bd3cc4c120223c46f.tar.gz | |
- MFZE1: Disable leak() and crash() when not using debug mode
| -rw-r--r-- | Zend/zend_builtin_functions.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 3c09474391..d87835a770 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -43,10 +43,12 @@ static ZEND_FUNCTION(get_parent_class); static ZEND_FUNCTION(method_exists); static ZEND_FUNCTION(class_exists); static ZEND_FUNCTION(function_exists); +#if ZEND_DEBUG static ZEND_FUNCTION(leak); #ifdef ZEND_TEST_EXCEPTIONS static ZEND_FUNCTION(crash); #endif +#endif static ZEND_FUNCTION(get_included_files); static ZEND_FUNCTION(is_subclass_of); static ZEND_FUNCTION(is_a); @@ -98,10 +100,12 @@ static zend_function_entry builtin_functions[] = { ZEND_FE(method_exists, NULL) ZEND_FE(class_exists, NULL) ZEND_FE(function_exists, NULL) +#if ZEND_DEBUG ZEND_FE(leak, NULL) #ifdef ZEND_TEST_EXCEPTIONS ZEND_FE(crash, NULL) #endif +#endif ZEND_FE(get_included_files, NULL) ZEND_FALIAS(get_required_files, get_included_files, NULL) ZEND_FE(is_subclass_of, NULL) @@ -836,7 +840,7 @@ ZEND_FUNCTION(function_exists) } /* }}} */ - +#if ZEND_DEBUG /* {{{ proto void leak(int num_bytes=3) Cause an intentional memory leak, for testing/debugging purposes */ ZEND_FUNCTION(leak) @@ -865,6 +869,7 @@ ZEND_FUNCTION(crash) } #endif +#endif /* ZEND_DEBUG */ /* {{{ proto array get_included_files(void) Returns an array with the file names that were include_once()'d */ |
