summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-27 15:31:48 +0200
committerAnatol Belski <ab@php.net>2014-08-27 20:49:31 +0200
commit3234480827b27ff5d3469a732167afd289632a96 (patch)
tree485ed0c4f5d35107a65ab193f3bc7c27806fbfca /ext/date/php_date.c
parentee552b628c2d9f9455ac85d7791b4b4e8e4ddeb2 (diff)
downloadphp-git-3234480827b27ff5d3469a732167afd289632a96.tar.gz
first show to make 's' work with size_t
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 94470ca919..0e43a33c73 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1055,7 +1055,7 @@ char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
/* }}} */
/* {{{ date_format - (gm)date helper */
-static zend_string *date_format(char *format, int format_len, timelib_time *t, int localtime TSRMLS_DC)
+static zend_string *date_format(char *format, size_t format_len, timelib_time *t, size_t localtime TSRMLS_DC)
{
smart_str string = {0};
int i, length = 0;
@@ -1216,7 +1216,7 @@ static zend_string *date_format(char *format, int format_len, timelib_time *t, i
static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime)
{
char *format;
- int format_len;
+ size_t format_len;
zend_long ts;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &format, &format_len, &ts) == FAILURE) {
@@ -1440,7 +1440,8 @@ PHPAPI zend_long php_parse_date(char *string, zend_long *now)
PHP_FUNCTION(strtotime)
{
char *times, *initial_ts;
- int time_len, error1, error2;
+ size_t time_len;
+ int error1, error2;
struct timelib_error_container *error;
zend_long preset_ts = 0, ts;
@@ -2503,7 +2504,7 @@ static void update_errors_warnings(timelib_error_container *last_errors TSRMLS_D
DATEG(last_errors) = last_errors;
} /* }}} */
-PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, char *format, zval *timezone_object, int ctor TSRMLS_DC) /* {{{ */
+PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, size_t time_str_len, char *format, zval *timezone_object, size_t ctor TSRMLS_DC) /* {{{ */
{
timelib_time *now;
timelib_tzinfo *tzi = NULL;
@@ -2641,7 +2642,7 @@ PHP_FUNCTION(date_create_from_format)
{
zval *timezone_object = NULL;
char *time_str = NULL, *format_str = NULL;
- int time_str_len = 0, format_str_len = 0;
+ size_t time_str_len = 0, format_str_len = 0;
zval datetime_object;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|O", &format_str, &format_str_len, &time_str, &time_str_len, &timezone_object, date_ce_timezone) == FAILURE) {
@@ -2979,7 +2980,7 @@ void php_date_do_return_parsed_time(INTERNAL_FUNCTION_PARAMETERS, timelib_time *
PHP_FUNCTION(date_parse)
{
char *date;
- int date_len;
+ size_t date_len;
struct timelib_error_container *error;
timelib_time *parsed_time;
@@ -3781,7 +3782,7 @@ PHP_FUNCTION(timezone_name_from_abbr)
{
char *abbr;
char *tzid;
- int abbr_len;
+ size_t abbr_len;
zend_long gmtoffset = -1;
zend_long isdst = -1;
@@ -4336,7 +4337,7 @@ PHP_METHOD(DatePeriod, __construct)
zval *start, *end = NULL, *interval;
zend_long recurrences = 0, options = 0;
char *isostr = NULL;
- int isostr_len = 0;
+ size_t isostr_len = 0;
timelib_time *clone;
zend_error_handling error_handling;
@@ -4439,7 +4440,7 @@ PHP_FUNCTION(timezone_identifiers_list)
int i, item_count;
zend_long what = PHP_DATE_TIMEZONE_GROUP_ALL;
char *option = NULL;
- int option_len = 0;
+ size_t option_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ls", &what, &option, &option_len) == FAILURE) {
RETURN_FALSE;
@@ -4521,7 +4522,7 @@ PHP_FUNCTION(timezone_abbreviations_list)
PHP_FUNCTION(date_default_timezone_set)
{
char *zone;
- int zone_len;
+ size_t zone_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &zone, &zone_len) == FAILURE) {
RETURN_FALSE;