com php-src: Fixed segfault while starting up: ext/intl/collator/collator.c ext/intl/common/common_error.c ext/intl/dateformat/datefo rmat.c
ext/intl/formatter/formatter.c ext/intl/locale/l ocale.c ext/intl/normalizer/normalizer.c ext/intl/php _intl.c
ext/intl/transliterator/transliterator.c
| From: | Xinchen Hui | Date: | Sat, 28 Jun 2014 12:14:12 +0000 |
| Subject: | com php-src: Fixed segfault while starting up: ext/intl/collator/collator.c ext/intl/common/common_error.c ext/intl/dateformat/datefo rmat.c ext/intl/formatter/formatter.c ext/intl/locale/l ocale.c ext/intl/normalizer/normalizer.c ext/intl/php _intl.c ext/intl/transliterator/transliterator.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79107@lists.php.net to get a copy of this message | ||
Commit: e4e9e80067076074e3e6fd9fd2603ec7698c0d33
Author: Xinchen Hui <laruence@php.net> Sat, 28 Jun 2014 20:14:12 +0800
Parents: b6e9c76d67a8cfb397598ac354d9aeb9609ba1d2
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e4e9e80067076074e3e6fd9fd2603ec7698c0d33
Log:
Fixed segfault while starting up
Changed paths:
M ext/intl/collator/collator.c
M ext/intl/common/common_error.c
M ext/intl/dateformat/dateformat.c
M ext/intl/formatter/formatter.c
M ext/intl/locale/locale.c
M ext/intl/normalizer/normalizer.c
M ext/intl/php_intl.c
M ext/intl/transliterator/transliterator.c
Diff:
diff --git a/ext/intl/collator/collator.c b/ext/intl/collator/collator.c
index 047a738..eff9568 100644
--- a/ext/intl/collator/collator.c
+++ b/ext/intl/collator/collator.c
@@ -38,7 +38,7 @@ void collator_register_constants( INIT_FUNC_ARGS )
return;
}
- #define COLLATOR_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS)
+ #define COLLATOR_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_PERSISTENT | CONST_CS)
#define COLLATOR_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( Collator_ce_ptr,
ZEND_STRS( #x ) - 1, UCOL_##x TSRMLS_CC );
#define COLLATOR_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long(
Collator_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );
diff --git a/ext/intl/common/common_error.c b/ext/intl/common/common_error.c
index f9289ad..2db688a 100644
--- a/ext/intl/common/common_error.c
+++ b/ext/intl/common/common_error.c
@@ -91,7 +91,7 @@ PHP_FUNCTION( intl_error_name )
*/
void intl_expose_icu_error_codes( INIT_FUNC_ARGS )
{
- #define INTL_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS)
+ #define INTL_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_PERSISTENT | CONST_CS)
/* Warnings */
INTL_EXPOSE_CONST( U_USING_FALLBACK_WARNING );
diff --git a/ext/intl/dateformat/dateformat.c b/ext/intl/dateformat/dateformat.c
index 29cb6ff..ef8fe13 100644
--- a/ext/intl/dateformat/dateformat.c
+++ b/ext/intl/dateformat/dateformat.c
@@ -34,7 +34,7 @@ void dateformat_register_constants( INIT_FUNC_ARGS )
return;
}
- #define DATEFORMATTER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS)
+ #define DATEFORMATTER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_PERSISTENT | CONST_CS)
#define DATEFORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long(
IntlDateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UDAT_##x TSRMLS_CC );
#define DATEFORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long(
IntlDateFormatter_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );
diff --git a/ext/intl/formatter/formatter.c b/ext/intl/formatter/formatter.c
index 1b7922c..12cbb6c 100644
--- a/ext/intl/formatter/formatter.c
+++ b/ext/intl/formatter/formatter.c
@@ -40,7 +40,7 @@ void formatter_register_constants( INIT_FUNC_ARGS )
zend_error(E_ERROR, "NumberFormatter class not defined");
}
- #define FORMATTER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS)
+ #define FORMATTER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_PERSISTENT | CONST_CS)
#define FORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( NumberFormatter_ce_ptr,
ZEND_STRS( #x ) - 1, UNUM_##x TSRMLS_CC );
#define FORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long(
NumberFormatter_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );
diff --git a/ext/intl/locale/locale.c b/ext/intl/locale/locale.c
index ffc463f..921e6e5 100644
--- a/ext/intl/locale/locale.c
+++ b/ext/intl/locale/locale.c
@@ -39,7 +39,7 @@ void locale_register_constants( INIT_FUNC_ARGS )
return;
}
- #define LOCALE_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS)
+ #define LOCALE_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_PERSISTENT | CONST_CS)
#define LOCALE_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( Locale_ce_ptr, ZEND_STRS(
#x ) - 1, ULOC_##x TSRMLS_CC );
#define LOCALE_EXPOSE_CUSTOM_CLASS_CONST_STR(name, value) zend_declare_class_constant_string(
Locale_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );
diff --git a/ext/intl/normalizer/normalizer.c b/ext/intl/normalizer/normalizer.c
index 033b05c..f06a3e6 100644
--- a/ext/intl/normalizer/normalizer.c
+++ b/ext/intl/normalizer/normalizer.c
@@ -37,7 +37,7 @@ void normalizer_register_constants( INIT_FUNC_ARGS )
return;
}
- #define NORMALIZER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS)
+ #define NORMALIZER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_PERSISTENT | CONST_CS)
#define NORMALIZER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( Normalizer_ce_ptr,
ZEND_STRS( #x ) - 1, NORMALIZER_##x TSRMLS_CC );
#define NORMALIZER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long(
Normalizer_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c
index 5b8a730..c1171ad 100644
--- a/ext/intl/php_intl.c
+++ b/ext/intl/php_intl.c
@@ -910,7 +910,7 @@ PHP_MINIT_FUNCTION( intl )
/* For the default locale php.ini setting */
REGISTER_INI_ENTRIES();
- REGISTER_LONG_CONSTANT("INTL_MAX_LOCALE_LEN", INTL_MAX_LOCALE_LEN, CONST_CS);
+ REGISTER_LONG_CONSTANT("INTL_MAX_LOCALE_LEN", INTL_MAX_LOCALE_LEN, CONST_PERSISTENT |
CONST_CS);
REGISTER_STRING_CONSTANT("INTL_ICU_VERSION", U_ICU_VERSION, CONST_PERSISTENT |
CONST_CS);
#ifdef U_ICU_DATA_VERSION
REGISTER_STRING_CONSTANT("INTL_ICU_DATA_VERSION", U_ICU_DATA_VERSION, CONST_PERSISTENT |
CONST_CS);
diff --git a/ext/intl/transliterator/transliterator.c b/ext/intl/transliterator/transliterator.c
index 8ee49e1..5f698e2 100644
--- a/ext/intl/transliterator/transliterator.c
+++ b/ext/intl/transliterator/transliterator.c
@@ -35,7 +35,7 @@ void transliterator_register_constants( INIT_FUNC_ARGS )
return;
}
- #define TRANSLITERATOR_EXPOSE_CONST( x ) REGISTER_LONG_CONSTANT( #x, x, CONST_CS )
+ #define TRANSLITERATOR_EXPOSE_CONST( x ) REGISTER_LONG_CONSTANT( #x, x, CONST_PERSISTENT |
CONST_CS )
#define TRANSLITERATOR_EXPOSE_CLASS_CONST( x ) zend_declare_class_constant_long(
Transliterator_ce_ptr, ZEND_STRS( #x ) - 1, TRANSLITERATOR_##x TSRMLS_CC );
#define TRANSLITERATOR_EXPOSE_CUSTOM_CLASS_CONST( name, value ) zend_declare_class_constant_long(
Transliterator_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );*/