diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2014-04-02 14:34:44 +0400 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2014-04-02 14:34:44 +0400 |
| commit | d8099d0468426dbee59f540048376653535270ce (patch) | |
| tree | 133021a1fda6a2453efcd9a279e9b0a55c006396 /Zend/zend_indent.c | |
| parent | 3b25faa4aa844bce12b1cbb3a3938573965df485 (diff) | |
| download | php-git-d8099d0468426dbee59f540048376653535270ce.tar.gz | |
Changed data layout to allow more efficient operations
Diffstat (limited to 'Zend/zend_indent.c')
| -rw-r--r-- | Zend/zend_indent.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c index 5d627d4c1d..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,7 +131,7 @@ 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: @@ -142,7 +142,7 @@ dflt_printout: break; } } - token.type = 0; + ZVAL_UNDEF(&token); } } |
