summaryrefslogtreecommitdiff
path: root/ext/mbstring/mbstring.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-12-15 01:55:00 +0300
committerDmitry Stogov <dmitry@zend.com>2017-12-15 01:55:00 +0300
commitb864e6b58c2e1a7d2679412ad832903015961d3b (patch)
treef516b1f123ec66597a0f6d18a17f2affc31f1c91 /ext/mbstring/mbstring.c
parentfa06cbf50c620651433bf3ed26ee6a4aa07c1d9f (diff)
downloadphp-git-b864e6b58c2e1a7d2679412ad832903015961d3b.tar.gz
Move constants into read-only data segment
Diffstat (limited to 'ext/mbstring/mbstring.c')
-rw-r--r--ext/mbstring/mbstring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 086920846b..ae7305d5db 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -666,7 +666,7 @@ static void _php_mb_allocators_pfree(void *ptr)
pefree(ptr, 1);
}
-static mbfl_allocators _php_mb_allocators = {
+static const mbfl_allocators _php_mb_allocators = {
_php_mb_allocators_malloc,
_php_mb_allocators_realloc,
_php_mb_allocators_calloc,
@@ -1562,7 +1562,7 @@ PHP_MINIT_FUNCTION(mbstring)
#if defined(COMPILE_DL_MBSTRING) && defined(ZTS)
ZEND_TSRMLS_CACHE_UPDATE();
#endif
- __mbfl_allocators = &_php_mb_allocators;
+ __mbfl_allocators = (mbfl_allocators*)&_php_mb_allocators;
REGISTER_INI_ENTRIES();