summaryrefslogtreecommitdiff
path: root/ext/iconv/php_iconv.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/iconv/php_iconv.h')
-rw-r--r--ext/iconv/php_iconv.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h
index 271bf74d24..7d4fb470c5 100644
--- a/ext/iconv/php_iconv.h
+++ b/ext/iconv/php_iconv.h
@@ -40,29 +40,28 @@ PHP_MINFO_FUNCTION(iconv);
PHP_FUNCTION(iconv);
PHP_FUNCTION(ob_iconv_handler);
+PHP_FUNCTION(iconv_get_encoding);
PHP_FUNCTION(iconv_set_encoding);
ZEND_BEGIN_MODULE_GLOBALS(iconv)
- char *iconv_internal_encoding;
- char *iconv_output_encoding;
- int global_variable;
+ char *input_encoding;
+ char *internal_encoding;
+ char *output_encoding;
ZEND_END_MODULE_GLOBALS(iconv)
-/* In every function that needs to use variables in php_iconv_globals,
- do call ICONVLS_FETCH(); after declaring other variables used by
- that function, and always refer to them as ICONVG(variable).
- You are encouraged to rename these macros something shorter, see
- examples in any other php module directory.
-*/
-
#ifdef ZTS
+#define ICONVLS_D zend_iconv_globals *iconv_globals
+#define ICONVLS_C iconv_globals
#define ICONVG(v) (iconv_globals->v)
-#define ICONVLS_FETCH() php_iconv_globals *iconv_globals = ts_resource(iconv_globals_id)
+#define ICONVLS_FETCH() zend_iconv_globals *iconv_globals = ts_resource(iconv_globals_id)
#else
+#define ICONVLS_D
+#define ICONVLS_C
#define ICONVG(v) (iconv_globals.v)
#define ICONVLS_FETCH()
#endif
+#define ICONV_INPUT_ENCODING "ISO-8859-1"
#define ICONV_OUTPUT_ENCODING "ISO-8859-1"
#define ICONV_INTERNAL_ENCODING "ISO-8859-1"