com php-src: fix argument type & remove warning: ext/intl/datef ormat/dateformat_parse.c
| From: | Stanislav Malyshev | Date: | Mon, 21 Oct 2013 06:04:38 +0000 |
| Subject: | com php-src: fix argument type & remove warning: ext/intl/datef ormat/dateformat_parse.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73759@lists.php.net to get a copy of this message | ||
Commit: 3900ce97a3bc775bb44a8879e03a13dd47d10190
Author: Stanislav Malyshev <stas@php.net> Sun, 20 Oct 2013 22:59:07 -0700
Parents: 06954d1bc1966ade0815db3f4ec8983b954950c1
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3900ce97a3bc775bb44a8879e03a13dd47d10190
Log:
fix argument type & remove warning
Changed paths:
M ext/intl/dateformat/dateformat_parse.c
Diff:
diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c
index 4193e89..9930778 100644
--- a/ext/intl/dateformat/dateformat_parse.c
+++ b/ext/intl/dateformat/dateformat_parse.c
@@ -62,7 +62,7 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex
}
/* }}} */
-static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, UCalendar
parsed_calendar, long calendar_field, char* key_name TSRMLS_DC)
+static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, const
UCalendar *parsed_calendar, long calendar_field, char* key_name TSRMLS_DC)
{
long calendar_field_val = ucal_get( parsed_calendar, calendar_field,
&INTL_DATA_ERROR_CODE(dfo));
INTL_METHOD_CHECK_STATUS( dfo, "Date parsing - localtime failed : could not get a field from
calendar" );
@@ -83,7 +83,7 @@ static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_va
*/
static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* text_to_parse, int32_t
text_len, int32_t *parse_pos, zval *return_value TSRMLS_DC)
{
- UCalendar* parsed_calendar = NULL;
+ UCalendar *parsed_calendar = NULL;
UChar* text_utf16 = NULL;
int32_t text_utf16_len = 0;
long isInDST = 0;
@@ -92,7 +92,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex
intl_convert_utf8_to_utf16(&text_utf16, &text_utf16_len, text_to_parse, text_len,
&INTL_DATA_ERROR_CODE(dfo));
INTL_METHOD_CHECK_STATUS(dfo, "Error converting timezone to UTF-16" );
- parsed_calendar = udat_getCalendar(DATE_FORMAT_OBJECT(dfo));
+ parsed_calendar = (UCalendar *)udat_getCalendar(DATE_FORMAT_OBJECT(dfo));
udat_parseCalendar( DATE_FORMAT_OBJECT(dfo), parsed_calendar, text_utf16, text_utf16_len,
parse_pos, &INTL_DATA_ERROR_CODE(dfo));
if (text_utf16) {