summaryrefslogtreecommitdiff
path: root/ext/intl/intl_error.c
diff options
context:
space:
mode:
authorStanley Sufficool <ssufficool@php.net>2014-10-20 21:33:32 -0700
committerStanley Sufficool <ssufficool@php.net>2014-10-20 21:33:32 -0700
commit8defcb855ab01d9c8ab4759cb793d80149b55a8c (patch)
treeed51eb30a2cbc92b102557498fb3e4113da1bb07 /ext/intl/intl_error.c
parent9c7dbb0487f5991fde03873ea8f5e66d6688415f (diff)
parentbaddb1c73a170ef1d2c31bd54cddbc6e1ab596b9 (diff)
downloadphp-git-8defcb855ab01d9c8ab4759cb793d80149b55a8c.tar.gz
Merge branch 'master' of https://git.php.net/push/php-src
* 'master' of https://git.php.net/push/php-src: (6215 commits) Extra comma Moved proxy object support in ASSIGN_ADD (and family) from VM to slow paths of corresponding operators Simplification zend_get_property_info_quick() cleanup and optimization initialize lineno before calling compile file file in phar Use ADDREF instead of DUP, it must be enough. Removed old irrelevant comment fixed compilation error Fix bug #68262: Broken reference across cloned objects export functions needed for phpdbg Fixed compilation Optimized property access handlers. Removed EG(std_property_info). Fixed bug #68199 (PDO::pgsqlGetNotify doesn't support NOTIFY payloads) Don't make difference between undefined and unaccessible properies when call __get() and family Don't make useless CSE array_pop/array_shift optimization check for zlib headers as well as lib for mysqlnd a realpath cache key can be int or float, catching this News entry for new curl constants News entry for new curl constants ...
Diffstat (limited to 'ext/intl/intl_error.c')
-rw-r--r--ext/intl/intl_error.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c
index 99b1c6001c..9474834417 100644
--- a/ext/intl/intl_error.c
+++ b/ext/intl/intl_error.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -129,24 +129,24 @@ void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_D
/* {{{ const char* intl_error_get_message( intl_error* err )
* Create output message in format "<intl_error_text>: <extra_user_error_text>".
*/
-char* intl_error_get_message( intl_error* err TSRMLS_DC )
+zend_string * intl_error_get_message( intl_error* err TSRMLS_DC )
{
- const char* uErrorName = NULL;
- char* errMessage = 0;
+ const char *uErrorName = NULL;
+ zend_string *errMessage = 0;
if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) )
- return estrdup( "" );
+ return STR_EMPTY_ALLOC();
uErrorName = u_errorName( err->code );
/* Format output string */
if( err->custom_error_message )
{
- spprintf( &errMessage, 0, "%s: %s", err->custom_error_message, uErrorName );
+ errMessage = strpprintf(0, "%s: %s", err->custom_error_message, uErrorName );
}
else
{
- spprintf( &errMessage, 0, "%s", uErrorName );
+ errMessage = strpprintf(0, "%s", uErrorName );
}
return errMessage;
@@ -240,7 +240,7 @@ void intl_register_IntlException_class( TSRMLS_D )
/* Create and register 'IntlException' class. */
INIT_CLASS_ENTRY_EX( ce, "IntlException", sizeof( "IntlException" ) - 1, NULL );
IntlException_ce_ptr = zend_register_internal_class_ex( &ce,
- default_exception_ce, NULL TSRMLS_CC );
+ default_exception_ce TSRMLS_CC );
IntlException_ce_ptr->create_object = default_exception_ce->create_object;
}
@@ -258,7 +258,7 @@ smart_str intl_parse_error_to_string( UParseError* pe )
if( pe->line > 0 )
{
smart_str_appends( &ret, "on line " );
- smart_str_append_long( &ret, (long ) pe->line );
+ smart_str_append_long( &ret, (zend_long ) pe->line );
any = 1;
}
if( pe->offset >= 0 ) {
@@ -268,7 +268,7 @@ smart_str intl_parse_error_to_string( UParseError* pe )
smart_str_appends( &ret, "at " );
smart_str_appends( &ret, "offset " );
- smart_str_append_long( &ret, (long ) pe->offset );
+ smart_str_append_long( &ret, (zend_long ) pe->offset );
any = 1;
}