Skip to content

Commit 8bef8e6

Browse files
committed
fix argument type & remove warning
1 parent ef9069b commit 8bef8e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/intl/dateformat/dateformat_parse.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex
6262
}
6363
/* }}} */
6464

65-
static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, UCalendar parsed_calendar, long calendar_field, char* key_name TSRMLS_DC)
65+
static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, const UCalendar *parsed_calendar, long calendar_field, char* key_name TSRMLS_DC)
6666
{
6767
long calendar_field_val = ucal_get( parsed_calendar, calendar_field, &INTL_DATA_ERROR_CODE(dfo));
6868
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
8383
*/
8484
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)
8585
{
86-
UCalendar* parsed_calendar = NULL;
86+
UCalendar *parsed_calendar = NULL;
8787
UChar* text_utf16 = NULL;
8888
int32_t text_utf16_len = 0;
8989
long isInDST = 0;
@@ -92,7 +92,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex
9292
intl_convert_utf8_to_utf16(&text_utf16, &text_utf16_len, text_to_parse, text_len, &INTL_DATA_ERROR_CODE(dfo));
9393
INTL_METHOD_CHECK_STATUS(dfo, "Error converting timezone to UTF-16" );
9494

95-
parsed_calendar = udat_getCalendar(DATE_FORMAT_OBJECT(dfo));
95+
parsed_calendar = (UCalendar *)udat_getCalendar(DATE_FORMAT_OBJECT(dfo));
9696
udat_parseCalendar( DATE_FORMAT_OBJECT(dfo), parsed_calendar, text_utf16, text_utf16_len, parse_pos, &INTL_DATA_ERROR_CODE(dfo));
9797

9898
if (text_utf16) {

0 commit comments

Comments
 (0)