summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.h
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2006-12-05 02:55:27 +0000
committerStanislav Malyshev <stas@php.net>2006-12-05 02:55:27 +0000
commit40b496d63f2813db9ddff6dd4300a5f613ff7b6c (patch)
treee63fe9f9b7c8783a62fb1255b3563edbe4618ef6 /Zend/zend_operators.h
parentbc07f14f7a2a50e90f765fb89904229ac9ea637c (diff)
downloadphp-git-40b496d63f2813db9ddff6dd4300a5f613ff7b6c.tar.gz
Merge from 5.2:
Improve tolower()-related functions on Windows and VC2005 by caching locale and using tolower_l function.
Diffstat (limited to 'Zend/zend_operators.h')
-rw-r--r--Zend/zend_operators.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index e5dc13c4ab..ec826b6059 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -451,6 +451,19 @@ END_EXTERN_C()
#define Z_TYPE_P(zval_p) Z_TYPE(*zval_p)
#define Z_TYPE_PP(zval_pp) Z_TYPE(**zval_pp)
+#if HAVE_SETLOCALE && defined(ZEND_WIN32) && !defined(ZTS) && defined(_MSC_VER) && (_MSC_VER >= 1400)
+/* This is performance improvement of tolower() on Windows and VC2005
+ * Gives 10-18% on bench.php
+ */
+#define ZEND_USE_TOLOWER_L 1
+#endif
+
+#ifdef ZEND_USE_TOLOWER_L
+ZEND_API void zend_update_current_locale();
+#else
+#define zend_update_current_locale()
+#endif
+
#endif
/*