diff options
| author | Masaki Fujimoto <fujimoto@php.net> | 2003-08-11 05:24:42 +0000 |
|---|---|---|
| committer | Masaki Fujimoto <fujimoto@php.net> | 2003-08-11 05:24:42 +0000 |
| commit | ab9dcec292eb8b7a928cd111044a6a3e374e2412 (patch) | |
| tree | 85917557d38a4bd8d75028b24de38805d521b953 /Zend/zend_globals.h | |
| parent | 4320c6994f0f84929141ea2543d95505e465b5d4 (diff) | |
| download | php-git-ab9dcec292eb8b7a928cd111044a6a3e374e2412.tar.gz | |
- added script encoding support to Zend Engine 2.
this enables ZE2 to gracefully parse scripts written in UTF-8 (with BOM),
UTF-16, UTF-32, Shift_JIS, ISO-2022-JP etc... (when configured with
'--enable-zend-multibyte' and '--enable-mbstring')
Diffstat (limited to 'Zend/zend_globals.h')
| -rw-r--r-- | Zend/zend_globals.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 1152290409..95f3c8933d 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -35,6 +35,10 @@ #include "zend_objects.h" #include "zend_objects_API.h" +#ifdef ZEND_MULTIBYTE +#include "zend_multibyte.h" +#endif /* ZEND_MULTIBYTE */ + /* Define ZTS if you want a thread-safe Zend */ /*#undef ZTS*/ @@ -127,6 +131,18 @@ struct _zend_compiler_globals { char *doc_comment; zend_uint doc_comment_len; + +#ifdef ZEND_MULTIBYTE + zend_encoding **script_encoding_list; + int script_encoding_list_size; + + zend_encoding *internal_encoding; + + /* multibyte utility functions */ + zend_encoding_detector encoding_detector; + zend_encoding_converter encoding_converter; + zend_encoding_oddlen encoding_oddlen; +#endif /* ZEND_MULTIBYTE */ }; @@ -271,6 +287,22 @@ struct _zend_scanner_globals { int yy_start_stack_ptr; int yy_start_stack_depth; int *yy_start_stack; + +#ifdef ZEND_MULTIBYTE + /* original (unfiltered) script */ + char *script_org; + int script_org_size; + + /* filtered script */ + char *script_filtered; + int script_filtered_size; + + /* input/ouput filters */ + zend_encoding_filter input_filter; + zend_encoding_filter output_filter; + zend_encoding *script_encoding; + zend_encoding *internal_encoding; +#endif /* ZEND_MULTIBYTE */ }; #endif /* ZEND_GLOBALS_H */ |
