diff options
author | Zeev Suraski <zeev@php.net> | 1999-12-04 13:26:57 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-12-04 13:26:57 +0000 |
commit | 9baad804595a97e47baf3f75836fcc9596f2351e (patch) | |
tree | e19df22a56f05958ab5ab540c964a9f60ef95931 /Zend/zend-parser.y | |
parent | da5464b145be141a4b9a7130d554f73e022acc85 (diff) | |
download | php-git-9baad804595a97e47baf3f75836fcc9596f2351e.tar.gz |
- Break the zend->PHP dependency introduced by the .php extension for use(),
by providing an API
- Enable Stig's patch for use() extensions (it wasn't refered to by the parser)
- Fix a memory leak in that code
Diffstat (limited to 'Zend/zend-parser.y')
-rw-r--r-- | Zend/zend-parser.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend-parser.y b/Zend/zend-parser.y index b8eb3239da..ec23addf7d 100644 --- a/Zend/zend-parser.y +++ b/Zend/zend-parser.y @@ -180,8 +180,8 @@ statement: | T_ECHO echo_expr_list ';' | T_INLINE_HTML { do_echo(&$1 CLS_CC); } | expr ';' { do_free(&$1 CLS_CC); } - | T_REQUIRE expr ';' { if ($2.op_type==IS_CONST && $2.u.constant.type==IS_STRING) { require_filename($2.u.constant.value.str.val, 0 CLS_CC); zval_dtor(&$2.u.constant); } else { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); } } - | T_USE use_filename ';' { require_filename($2.u.constant.value.str.val, 1 CLS_CC); zval_dtor(&$2.u.constant); } + | T_REQUIRE expr ';' { if ($2.op_type==IS_CONST && $2.u.constant.type==IS_STRING) { require_filename($2.u.constant.value.str.val CLS_CC); zval_dtor(&$2.u.constant); } else { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); } } + | T_USE use_filename ';' { use_filename($2.u.constant.value.str.val, $2.u.constant.value.str.len CLS_CC); zval_dtor(&$2.u.constant); } | T_UNSET '(' r_cvar ')' ';' { do_unset(&$3 CLS_CC); } | T_FOREACH '(' expr T_AS { do_foreach_begin(&$1, &$3, &$2, &$4 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); } | ';' /* empty statement */ |