summaryrefslogtreecommitdiff
path: root/ext/tokenizer
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tokenizer')
-rw-r--r--ext/tokenizer/tokenizer.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index ddf6282b3..3c551f187 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tokenizer.c,v 1.31.2.5.2.7.2.13 2008/12/31 11:15:46 sebastian Exp $ */
+/* $Id: tokenizer.c,v 1.31.2.5.2.7.2.14 2009/03/25 15:23:17 dmitry Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -171,6 +171,7 @@ PHP_FUNCTION(token_get_all)
zend_save_lexical_state(&original_lex_state TSRMLS_CC);
if (zend_prepare_string_for_scanning(&source_z, "" TSRMLS_CC) == FAILURE) {
+ zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
RETURN_EMPTY_STRING();
}
@@ -178,10 +179,6 @@ PHP_FUNCTION(token_get_all)
tokenize(return_value TSRMLS_CC);
- while (!zend_stack_is_empty(&LANG_SCNG(state_stack))) {
- zend_stack_del_top(&LANG_SCNG(state_stack));
- }
-
zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
zval_dtor(&source_z);
}