diff options
| author | Zeev Suraski <zeev@php.net> | 2000-02-04 14:45:58 +0000 |
|---|---|---|
| committer | Zeev Suraski <zeev@php.net> | 2000-02-04 14:45:58 +0000 |
| commit | b6197bcf902373c481eac2c5484954c3b3bd5f85 (patch) | |
| tree | 75dcf52ac6d07dab7be506edf2e0d39505e32a29 /Zend/zend_execute_API.c | |
| parent | 2e90a7a368c54f1b2596caac67c325a97121b584 (diff) | |
| download | php-git-b6197bcf902373c481eac2c5484954c3b3bd5f85.tar.gz | |
Maintain a state of whether we're compiling and/or executing
Diffstat (limited to 'Zend/zend_execute_API.c')
| -rw-r--r-- | Zend/zend_execute_API.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index ba97c18410..a5e1d0c996 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -103,6 +103,8 @@ void init_executor(CLS_D ELS_DC) EG(function_table) = CG(function_table); EG(class_table) = CG(class_table); + EG(in_execution) = 0; + zend_ptr_stack_init(&EG(argument_stack)); EG(main_op_array) = NULL; @@ -201,6 +203,14 @@ ZEND_API uint zend_get_executed_lineno(ELS_D) } +ZEND_API zend_bool zend_is_executing() +{ + ELS_FETCH(); + + return EG(in_execution); +} + + ZEND_API inline void safe_free_zval_ptr(zval *p) { ELS_FETCH(); |
