]> granicus.if.org Git - php/commitdiff
fix datatype mismatches
authorAnatol Belski <ab@php.net>
Thu, 30 Oct 2014 17:37:56 +0000 (18:37 +0100)
committerAnatol Belski <ab@php.net>
Thu, 30 Oct 2014 19:06:51 +0000 (20:06 +0100)
ext/date/lib/parse_date.c
ext/date/lib/parse_date.re
ext/date/lib/parse_iso_intervals.c
ext/date/lib/parse_iso_intervals.re
ext/date/lib/timelib.h
ext/date/php_date.c
ext/date/php_date.h

index 2a615559f67d9d5fe2d37376ceeb285812ab3683..f9872a5ce38fad37b7a560d429dbd66cf810c5e6 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Tue Aug 26 10:40:19 2014 */
+/* Generated by re2c 0.13.5 on Thu Oct 30 18:16:16 2014 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
    +----------------------------------------------------------------------+
@@ -24712,7 +24712,7 @@ yy1537:
 
 #define YYMAXFILL 31
 
-timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper)
+timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper)
 {
        Scanner in;
        int t;
@@ -24823,7 +24823,7 @@ static void timelib_time_reset_unset_fields(timelib_time *time)
        if (time->f == TIMELIB_UNSET ) time->f = 0.0;
 }
 
-timelib_time *timelib_parse_from_format(char *format, char *string, int len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper)
+timelib_time *timelib_parse_from_format(char *format, char *string, size_t len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper)
 {
        char       *fptr = format;
        char       *ptr = string;
index cb5df1625184e0533bd1b7ed8b4f60a55082060e..7c4d14336816f6316fd720a3d785ce09319c61c2 100644 (file)
@@ -1721,7 +1721,7 @@ weekdayof        = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of
 
 /*!max:re2c */
 
-timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper)
+timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper)
 {
        Scanner in;
        int t;
@@ -1832,7 +1832,7 @@ static void timelib_time_reset_unset_fields(timelib_time *time)
        if (time->f == TIMELIB_UNSET ) time->f = 0.0;
 }
 
-timelib_time *timelib_parse_from_format(char *format, char *string, int len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper)
+timelib_time *timelib_parse_from_format(char *format, char *string, size_t len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper)
 {
        char       *fptr = format;
        char       *ptr = string;
index 3b7580f9d11ff7aaa88742420c8054d3d0eaa262..ffa33b0698793269138e44d3d13f4b1fe2006530 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Tue Aug 26 10:39:58 2014 */
+/* Generated by re2c 0.13.5 on Thu Oct 30 18:20:16 2014 */
 #line 1 "ext/date/lib/parse_iso_intervals.re"
 /*
    +----------------------------------------------------------------------+
@@ -1004,7 +1004,7 @@ yy100:
 
 #define YYMAXFILL 20
 
-void timelib_strtointerval(char *s, int len, 
+void timelib_strtointerval(char *s, size_t len, 
                            timelib_time **begin, timelib_time **end, 
                                                   timelib_rel_time **period, int *recurrences, 
                                                   struct timelib_error_container **errors)
index 097488ec57265a3fb20b29741bee36183ee475bb..b400522584fbd48fd6fa2d264643ee2fcd25bee8 100644 (file)
@@ -398,7 +398,7 @@ isoweek          = year4 "-"? "W" weekofyear;
 
 /*!max:re2c */
 
-void timelib_strtointerval(char *s, int len, 
+void timelib_strtointerval(char *s, size_t len, 
                            timelib_time **begin, timelib_time **end, 
                                                   timelib_rel_time **period, int *recurrences, 
                                                   struct timelib_error_container **errors)
index b7c49888cb223532a4500abdbbd611e856bcc769..552ec39221b9c0ca6c73cbba9a7d3e87d5eac58c 100644 (file)
@@ -68,15 +68,15 @@ int timelib_valid_time(timelib_sll h, timelib_sll i, timelib_sll s);
 int timelib_valid_date(timelib_sll y, timelib_sll m, timelib_sll d);
 
 /* From parse_date.re */
-timelib_time *timelib_strtotime(char *s, int len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper);
-timelib_time *timelib_parse_from_format(char *format, char *s, int len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper);
+timelib_time *timelib_strtotime(char *s, size_t len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper);
+timelib_time *timelib_parse_from_format(char *format, char *s, size_t len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper);
 void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options);
 char *timelib_timezone_id_from_abbr(const char *abbr, timelib_long gmtoffset, int isdst);
 const timelib_tz_lookup_table *timelib_timezone_abbreviations_list(void);
 timelib_long timelib_parse_tz_cor(char**);
 
 /* From parse_iso_intervals.re */
-void timelib_strtointerval(char *s, int len, 
+void timelib_strtointerval(char *s, size_t len, 
                            timelib_time **begin, timelib_time **end, 
                                                   timelib_rel_time **period, int *recurrences, 
                                                   struct timelib_error_container **errors);
index f2ced7bd595b6db5a5676ff1c5c1901ca48ea0a0..6146dec927d1e6734b403c19a4b95d2a53bd1e11 100644 (file)
@@ -1230,7 +1230,7 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime)
 }
 /* }}} */
 
-PHPAPI zend_string *php_format_date(char *format, int format_len, time_t ts, int localtime TSRMLS_DC) /* {{{ */
+PHPAPI zend_string *php_format_date(char *format, size_t format_len, time_t ts, int localtime TSRMLS_DC) /* {{{ */
 {
        timelib_time   *t;
        timelib_tzinfo *tzi;
@@ -3031,7 +3031,7 @@ PHP_FUNCTION(date_format)
 }
 /* }}} */
 
-static int php_date_modify(zval *object, char *modify, int modify_len TSRMLS_DC) /* {{{ */
+static int php_date_modify(zval *object, char *modify, size_t modify_len TSRMLS_DC) /* {{{ */
 {
        php_date_obj *dateobj;
        timelib_time *tmp_time;
@@ -3938,7 +3938,7 @@ PHP_FUNCTION(timezone_location_get)
 }
 /* }}} */
 
-static int date_interval_initialize(timelib_rel_time **rt, /*const*/ char *format, int format_length TSRMLS_DC) /* {{{ */
+static int date_interval_initialize(timelib_rel_time **rt, /*const*/ char *format, size_t format_length TSRMLS_DC) /* {{{ */
 {
        timelib_time     *b = NULL, *e = NULL;
        timelib_rel_time *p = NULL;
@@ -4221,7 +4221,7 @@ PHP_FUNCTION(date_interval_create_from_date_string)
 /* }}} */
 
 /* {{{ date_interval_format -  */
-static zend_string *date_interval_format(char *format, int format_len, timelib_rel_time *t TSRMLS_DC)
+static zend_string *date_interval_format(char *format, size_t format_len, timelib_rel_time *t TSRMLS_DC)
 {
        smart_str            string = {0};
        int                  i, length, have_format_spec = 0;
@@ -4302,7 +4302,7 @@ PHP_FUNCTION(date_interval_format)
 }
 /* }}} */
 
-static int date_period_initialize(timelib_time **st, timelib_time **et, timelib_rel_time **d, zend_long *recurrences, /*const*/ char *format, int format_length TSRMLS_DC) /* {{{ */
+static int date_period_initialize(timelib_time **st, timelib_time **et, timelib_rel_time **d, zend_long *recurrences, /*const*/ char *format, size_t format_length TSRMLS_DC) /* {{{ */
 {
        timelib_time     *b = NULL, *e = NULL;
        timelib_rel_time *p = NULL;
index aa46aa1b6cf52023a0f6a55b177d16b64b562c0d..ebbf9a9027189018ebc6b6b180a36170ecdf2be7 100644 (file)
@@ -210,7 +210,7 @@ PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC);
 #define _php_strftime php_strftime
 PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm);
 #endif
-PHPAPI zend_string *php_format_date(char *format, int format_len, time_t ts, int localtime TSRMLS_DC);
+PHPAPI zend_string *php_format_date(char *format, size_t format_len, time_t ts, int localtime TSRMLS_DC);
 
 /* Mechanism to set new TZ database */
 PHPAPI void php_date_set_tzdb(timelib_tzdb *tzdb);