summaryrefslogtreecommitdiff
path: root/Zend/zend_indent.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_indent.c')
-rw-r--r--Zend/zend_indent.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c
index 10f9af7823..05254a30bc 100644
--- a/Zend/zend_indent.c
+++ b/Zend/zend_indent.c
@@ -59,14 +59,14 @@ ZEND_API void zend_indent(TSRMLS_D)
memset(emit_whitespace, 0, sizeof(int)*256);
/* highlight stuff coming back from zendlex() */
- token.type = 0;
+ ZVAL_UNDEF(&token);
while ((token_type=lex_scan(&token TSRMLS_CC))) {
switch (token_type) {
case T_INLINE_HTML:
zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
break;
case T_WHITESPACE: {
- token.type = 0;
+ ZVAL_UNDEF(&token);
/* eat whitespace, emit newlines */
for (i=0; i<LANG_SCNG(yy_leng); i++) {
emit_whitespace[(unsigned char) LANG_SCNG(yy_text)[i]]++;
@@ -78,7 +78,7 @@ ZEND_API void zend_indent(TSRMLS_D)
in_string = !in_string;
/* break missing intentionally */
default:
- if (token.type==0) {
+ if (Z_TYPE(token) == IS_UNDEF) {
/* keyword */
switch (token_type) {
case ',':
@@ -131,18 +131,18 @@ dflt_printout:
}
break;
}
- if (token.type == IS_STRING) {
+ if (Z_TYPE(token) == IS_STRING) {
switch (token_type) {
case T_OPEN_TAG:
case T_CLOSE_TAG:
case T_WHITESPACE:
break;
default:
- str_efree(token.value.str.val);
+ STR_RELEASE(Z_STR(token));
break;
}
}
- token.type = 0;
+ ZVAL_UNDEF(&token);
}
}