cvs: php-src /ext/intl intl_data.h intl_error.c
| From: | Stanislav Malyshev | Date: | Sun, 10 May 2009 21:01:38 +0000 |
| Subject: | cvs: php-src /ext/intl intl_data.h intl_error.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-57694@lists.php.net to get a copy of this message | ||
stas Sun May 10 21:01:38 2009 UTC
Modified files:
/php-src/ext/intl intl_data.h intl_error.c
Log:
MF5 fixes
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/intl_data.h?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/intl/intl_data.h
diff -u php-src/ext/intl/intl_data.h:1.5 php-src/ext/intl/intl_data.h:1.6
--- php-src/ext/intl/intl_data.h:1.5 Tue Mar 10 23:39:22 2009
+++ php-src/ext/intl/intl_data.h Sun May 10 21:01:38 2009
@@ -45,12 +45,12 @@
obj = (oclass##_object *) zend_object_store_get_object( object TSRMLS_CC ); \
intl_error_reset( INTL_DATA_ERROR_P(obj) TSRMLS_CC ); \
-// Check status by error code, if error - exit
+/* Check status by error code, if error - exit */
#define INTL_CHECK_STATUS(err, msg)
\
intl_error_set_code( NULL, (err) TSRMLS_CC );
\
if( U_FAILURE((err)) )
\
{
\
- intl_errors_set_custom_msg( NULL, msg, 0 TSRMLS_CC ); \
+ intl_error_set_custom_msg( NULL, msg, 0 TSRMLS_CC ); \
RETURN_FALSE;
\
}
@@ -62,9 +62,9 @@
RETURN_FALSE; \
}
-#define INTL_MAX_LOCALE_LEN 64
+#define INTL_MAX_LOCALE_LEN 80
-// Check status, if error - destroy value and exit
+/* Check status, if error - destroy value and exit */
#define INTL_CTOR_CHECK_STATUS(obj, msg) \
intl_error_set_code( NULL, INTL_DATA_ERROR_CODE((obj)) TSRMLS_CC ); \
if( U_FAILURE( INTL_DATA_ERROR_CODE((obj)) ) ) \
@@ -77,14 +77,14 @@
#define INTL_CHECK_LOCALE_LEN(locale_len) \
if((locale_len) > INTL_MAX_LOCALE_LEN) { \
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, \
- "Locale string too long, should be no longer than 64 characters", 0 TSRMLS_CC ); \
+ "Locale string too long, should be no longer than 80 characters", 0 TSRMLS_CC ); \
RETURN_NULL(); \
}
#define INTL_CHECK_LOCALE_LEN_OBJ(locale_len, object) \
if((locale_len) > INTL_MAX_LOCALE_LEN) { \
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, \
- "Locale string too long, should be no longer than 64 characters", 0 TSRMLS_CC ); \
+ "Locale string too long, should be no longer than 80 characters", 0 TSRMLS_CC ); \
zval_dtor(object); \
ZVAL_NULL(object); \
RETURN_NULL(); \
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/intl_error.c?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/intl/intl_error.c
diff -u php-src/ext/intl/intl_error.c:1.4 php-src/ext/intl/intl_error.c:1.5
--- php-src/ext/intl/intl_error.c:1.4 Tue Mar 10 23:39:22 2009
+++ php-src/ext/intl/intl_error.c Sun May 10 21:01:38 2009
@@ -182,7 +182,9 @@
*/
void intl_errors_reset( intl_error* err TSRMLS_DC )
{
- intl_error_reset( err TSRMLS_CC );
+ if(err) {
+ intl_error_reset( err TSRMLS_CC );
+ }
intl_error_reset( NULL TSRMLS_CC );
}
/* }}} */
@@ -191,7 +193,9 @@
*/
void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_DC )
{
- intl_error_set_custom_msg( err, msg, copyMsg TSRMLS_CC );
+ if(err) {
+ intl_error_set_custom_msg( err, msg, copyMsg TSRMLS_CC );
+ }
intl_error_set_custom_msg( NULL, msg, copyMsg TSRMLS_CC );
}
/* }}} */
@@ -200,7 +204,9 @@
*/
void intl_errors_set_code( intl_error* err, UErrorCode err_code TSRMLS_DC )
{
- intl_error_set_code( err, err_code TSRMLS_CC );
+ if(err) {
+ intl_error_set_code( err, err_code TSRMLS_CC );
+ }
intl_error_set_code( NULL, err_code TSRMLS_CC );
}
/* }}} */