com php-src: replaced all arg formats in ext/standard: ext/standard/array.c ext/standard/assert.c ext/standard/basic_functions.c ext/ standard/dir.c
ext/standard/dns.c ext/standard/dns_wi n32.c ext/standard/exec.c ext/standard/file.c e xt/standard/fsock.c ext/standard/head.c ext/standard/ht ml.c
ext/standard/http.c ext/standard/image.c ext/s tandard/info.c ext/standard/iptc.c ext/standard/levensh tein.c ext/standard/math.c
ext/standard/metaphone.c ext/
| From: | Anatol Belski | Date: | Wed, 16 Oct 2013 10:10:48 +0000 |
| Subject: | com php-src: replaced all arg formats in ext/standard: ext/standard/array.c ext/standard/assert.c ext/standard/basic_functions.c ext/ standard/dir.c ext/standard/dns.c ext/standard/dns_wi n32.c ext/standard/exec.c ext/standard/file.c e xt/standard/fsock.c ext/standard/head.c ext/standard/ht ml.c ext/standard/http.c ext/standard/image.c ext/s tandard/info.c ext/standard/iptc.c ext/standard/levensh tein.c ext/standard/math.c ext/standard/metaphone.c ext/ |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73473@lists.php.net to get a copy of this message | ||
Commit: 4ea880353329eb56e66ed4ae3aa4aec66fdd2e61
Author: Anatol Belski <ab@php.net> Thu, 22 Aug 2013 10:51:29 -0700
Parents: f8923bb076170d6465cbefe08bdf760fb1f77673
Branches: str_size_and_int64
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4ea880353329eb56e66ed4ae3aa4aec66fdd2e61
Log:
replaced all arg formats in ext/standard
Changed paths:
M ext/standard/array.c
M ext/standard/assert.c
M ext/standard/basic_functions.c
M ext/standard/dir.c
M ext/standard/dns.c
M ext/standard/dns_win32.c
M ext/standard/exec.c
M ext/standard/file.c
M ext/standard/fsock.c
M ext/standard/head.c
M ext/standard/html.c
M ext/standard/http.c
M ext/standard/image.c
M ext/standard/info.c
M ext/standard/iptc.c
M ext/standard/levenshtein.c
M ext/standard/math.c
M ext/standard/metaphone.c
M ext/standard/microtime.c
M ext/standard/password.c
M ext/standard/proc_open.c
M ext/standard/rand.c
M ext/standard/streamsfuncs.c
M ext/standard/string.c
M ext/standard/syslog.c
M ext/standard/type.c
M ext/standard/url.c
M main/SAPI.h
diff --git a/ext/standard/array.c b/ext/standard/array.c index df9836e..3987242 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -258,7 +258,7 @@ PHP_FUNCTION(ksort) zval *array; php_int_t sort_type = PHP_SORT_REGULAR; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &array, &sort_type) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|i", &array, &sort_type) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/assert.c b/ext/standard/assert.c index a67d8af..7ecfd5e 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -265,11 +265,11 @@ PHP_FUNCTION(assert) PHP_FUNCTION(assert_options) { zval **value = NULL; - long what; + php_int_t what; int oldint; int ac = ZEND_NUM_ARGS(); - if (zend_parse_parameters(ac TSRMLS_CC, "l|Z", &what, &value) == FAILURE) { + if (zend_parse_parameters(ac TSRMLS_CC, "i|Z", &what, &value) == FAILURE) { return; } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index b4aaf7d..da8e87e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4441,9 +4441,9 @@ PHP_FUNCTION(flush) Delay for a given number of seconds */ PHP_FUNCTION(sleep) { - long num; + php_int_t num; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &num) == FAILURE) { RETURN_FALSE; } if (num < 0) { @@ -4464,9 +4464,9 @@ PHP_FUNCTION(sleep) PHP_FUNCTION(usleep) { #if HAVE_USLEEP - long num; + php_int_t num; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &num) == FAILURE) { return; } if (num < 0) { @@ -4483,10 +4483,10 @@ PHP_FUNCTION(usleep) Delay for a number of seconds and nano seconds */ PHP_FUNCTION(time_nanosleep) { - long tv_sec, tv_nsec; + php_int_t tv_sec, tv_nsec; struct timespec php_req, php_rem; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &tv_sec, &tv_nsec) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ii", &tv_sec, &tv_nsec) == FAILURE) { return; } @@ -5648,10 +5648,10 @@ PHP_FUNCTION(getservbyport) { char *proto; zend_str_size proto_len; - long port; + php_int_t port; struct servent *serv; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lS", &port, &proto, &proto_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "iS", &port, &proto, &proto_len) == FAILURE) { return; } @@ -5695,10 +5695,10 @@ PHP_FUNCTION(getprotobyname) Returns protocol name associated with protocol number proto */ PHP_FUNCTION(getprotobynumber) { - long proto; + php_int_t proto; struct protoent *ent; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &proto) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &proto) == FAILURE) { return; } @@ -6015,10 +6015,10 @@ PHP_FUNCTION(parse_ini_string) char *string = NULL, *str = NULL; zend_str_size str_len = 0; zend_bool process_sections = 0; - long scanner_mode = ZEND_INI_SCANNER_NORMAL; + php_int_t scanner_mode = ZEND_INI_SCANNER_NORMAL; zend_ini_parser_cb_t ini_parser_cb; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|bl", &str, &str_len, &process_sections, &scanner_mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|bi", &str, &str_len, &process_sections, &scanner_mode) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/dir.c b/ext/standard/dir.c index b65a46d..2015cc4 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -432,13 +432,13 @@ PHP_FUNCTION(glob) #endif char *pattern = NULL; zend_str_size pattern_len; - long flags = 0; + php_int_t flags = 0; glob_t globbuf; int n; int ret; zend_bool basedir_limit = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|l", &pattern, &pattern_len, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|i", &pattern, &pattern_len, &flags) == FAILURE) { return; } @@ -555,13 +555,13 @@ PHP_FUNCTION(scandir) { char *dirn; zend_str_size dirn_len; - long flags = 0; + php_int_t flags = 0; char **namelist; int n, i; zval *zcontext = NULL; php_stream_context *context = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|lr", &dirn, &dirn_len, &flags, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|ir", &dirn, &dirn_len, &flags, &zcontext) == FAILURE) { return; } diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 136ef0f..5aa0a11 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -715,7 +715,7 @@ PHP_FUNCTION(dns_get_record) { char *hostname; zend_str_size_int hostname_len; - long type_param = PHP_DNS_ANY; + php_int_t type_param = PHP_DNS_ANY; zval *authns = NULL, *addtl = NULL; int type_to_fetch; #if defined(HAVE_DNS_SEARCH) @@ -733,7 +733,7 @@ PHP_FUNCTION(dns_get_record) int type, first_query = 1, store_results = 1; zend_bool raw = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lz!z!b", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iz!z!b", &hostname, &hostname_len, &type_param, &authns, &addtl, &raw) == FAILURE) { return; } diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index 08d7e6c..70ca762 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -349,12 +349,12 @@ PHP_FUNCTION(dns_get_record) { char *hostname; zend_str_size_int hostname_len; - long type_param = PHP_DNS_ANY; + php_int_t type_param = PHP_DNS_ANY; zval *authns = NULL, *addtl = NULL; int type, type_to_fetch, first_query = 1, store_results = 1; zend_bool raw = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lz!z!b", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iz!z!b", &hostname, &hostname_len, &type_param, &authns, &addtl, &raw) == FAILURE) { return; } diff --git a/ext/standard/exec.c b/ext/standard/exec.c index a5f702f..d5f921a 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -471,9 +471,9 @@ PHP_FUNCTION(shell_exec) Change the priority of the current process */ PHP_FUNCTION(proc_nice) { - long pri; + php_int_t pri; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &pri) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &pri) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/file.c b/ext/standard/file.c index 144270f..a01b421 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -334,9 +334,9 @@ PHP_FUNCTION(flock) zval *arg1, *arg3 = NULL; int act; php_stream *stream; - long operation = 0; + php_int_t operation = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &arg1, &operation, &arg3) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri|z", &arg1, &operation, &arg3) == FAILURE) { return; } @@ -520,13 +520,13 @@ PHP_FUNCTION(file_get_contents) zend_bool use_include_path = 0; php_stream *stream; zend_str_size len; - long offset = -1; - long maxlen = PHP_STREAM_COPY_ALL; + php_int_t offset = -1; + php_int_t maxlen = PHP_STREAM_COPY_ALL; zval *zcontext = NULL; php_stream_context *context = NULL; /* Parse arguments */ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|br!ll", &filename, &filename_len, &use_include_path, &zcontext, &offset, &maxlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|br!ii", &filename, &filename_len, &use_include_path, &zcontext, &offset, &maxlen) == FAILURE) { return; } @@ -713,7 +713,7 @@ PHP_FUNCTION(file) register int i = 0; zend_str_size target_len; char eol_marker = '\n'; - long flags = 0; + php_int_t flags = 0; zend_bool use_include_path; zend_bool include_new_line; zend_bool skip_blank_lines; @@ -722,7 +722,7 @@ PHP_FUNCTION(file) php_stream_context *context = NULL; /* Parse arguments */ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|lr!", &filename, &filename_len, &flags, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|ir!", &filename, &filename_len, &flags, &zcontext) == FAILURE) { return; } if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | PHP_FILE_NO_DEFAULT_CONTEXT)) { @@ -994,13 +994,13 @@ PHPAPI PHP_FUNCTION(feof) PHPAPI PHP_FUNCTION(fgets) { zval *arg1; - long len = 1024; + php_int_t len = 1024; char *buf = NULL; int argc = ZEND_NUM_ARGS(); size_t line_len = 0; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &arg1, &len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|i", &arg1, &len) == FAILURE) { RETURN_FALSE; } @@ -1073,7 +1073,7 @@ PHPAPI PHP_FUNCTION(fgetc) PHPAPI PHP_FUNCTION(fgetss) { zval *fd; - long bytes = 0; + php_int_t bytes = 0; zend_str_size len = 0; zend_str_size actual_len, retval_len; char *buf = NULL, *retval; @@ -1081,7 +1081,7 @@ PHPAPI PHP_FUNCTION(fgetss) char *allowed_tags=NULL; zend_str_size allowed_tags_len=0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|lS", &fd, &bytes, &allowed_tags, &allowed_tags_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|iS", &fd, &bytes, &allowed_tags, &allowed_tags_len) == FAILURE) { RETURN_FALSE; } @@ -1318,11 +1318,11 @@ PHP_FUNCTION(mkdir) char *dir; zend_str_size dir_len; zval *zcontext = NULL; - long mode = 0777; + php_int_t mode = 0777; zend_bool recursive = 0; php_stream_context *context; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|lbr", &dir, &dir_len, &mode, &recursive, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|ibr", &dir, &dir_len, &mode, &recursive, &zcontext) == FAILURE) { RETURN_FALSE; } @@ -1384,7 +1384,7 @@ PHP_FUNCTION(readfile) Return or change the umask */ PHP_FUNCTION(umask) { - long arg1 = 0; + php_int_t arg1 = 0; int oldumask; oldumask = umask(077); @@ -1392,8 +1392,8 @@ PHP_FUNCTION(umask) if (BG(umask) == -1) { BG(umask) = oldumask; } - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &arg1) == FAILURE) { + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &arg1) == FAILURE) { RETURN_FALSE; } @@ -1499,10 +1499,10 @@ PHP_FUNCTION(unlink) PHP_NAMED_FUNCTION(php_if_ftruncate) { zval *fp; - long size; + php_int_t size; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &fp, &size) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &fp, &size) == FAILURE) { RETURN_FALSE; } @@ -2440,9 +2440,9 @@ PHP_FUNCTION(fnmatch) { char *pattern, *filename; zend_str_size pattern_len, filename_len; - long flags = 0; + php_int_t flags = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "PP|l", &pattern, &pattern_len, &filename, &filename_len, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "PP|i", &pattern, &pattern_len, &filename, &filename_len, &flags) == FAILURE) { return; } diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index eec9819..9f71a99 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -33,7 +33,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent) { char *host; zend_str_size_int host_len; - long port = -1; + php_int_t port = -1; zval *zerrno = NULL, *zerrstr = NULL; double timeout = FG(default_socket_timeout); unsigned long conv; @@ -47,7 +47,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent) RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lzzd", &host, &host_len, &port, &zerrno, &zerrstr, &timeout) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|izzd", &host, &host_len, &port, &zerrno, &zerrstr, &timeout) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/head.c b/ext/standard/head.c index f84079b..0ea8e3d 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -41,7 +41,7 @@ PHP_FUNCTION(header) zend_bool rep = 1; sapi_header_line ctr = {0}; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|bl", &ctr.line, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|bi", &ctr.line, &ctr.line_len, &rep, &ctr.response_code) == FAILURE) return; @@ -178,11 +178,11 @@ PHPAPI int php_setcookie(char *name, zend_str_size_int name_len, char *value, ze PHP_FUNCTION(setcookie) { char *name, *value = NULL, *path = NULL, *domain = NULL; - long expires = 0; + php_int_t expires = 0; zend_bool secure = 0, httponly = 0; zend_str_size_int name_len, value_len = 0, path_len = 0, domain_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SlSSbb", &name, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SiSSbb", &name, &name_len, &value, &value_len, &expires, &path, &path_len, &domain, &domain_len, &secure, &httponly) == FAILURE) { return; @@ -201,11 +201,11 @@ PHP_FUNCTION(setcookie) PHP_FUNCTION(setrawcookie) { char *name, *value = NULL, *path = NULL, *domain = NULL; - long expires = 0; + php_int_t expires = 0; zend_bool secure = 0, httponly = 0; zend_str_size_int name_len, value_len = 0, path_len = 0, domain_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SlSSbb", &name, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SiSSbb", &name, &name_len, &value, &value_len, &expires, &path, &path_len, &domain, &domain_len, &secure, &httponly) == FAILURE) { return; @@ -289,9 +289,9 @@ PHP_FUNCTION(headers_list) Sets a response code, or returns the current HTTP response code */ PHP_FUNCTION(http_response_code) { - long response_code = 0; + php_int_t response_code = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &response_code) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &response_code) == FAILURE) { return; } diff --git a/ext/standard/html.c b/ext/standard/html.c index c00f90c..3582318 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1435,11 +1435,11 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all) char *str, *hint_charset = NULL; zend_str_size str_len, hint_charset_len = 0; size_t new_len; - long flags = ENT_COMPAT; + php_int_t flags = ENT_COMPAT; char *replaced; zend_bool double_encode = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lS!b", &str, &str_len, &flags, &hint_charset, &hint_charset_len, &double_encode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iS!b", &str, &str_len, &flags, &hint_charset, &hint_charset_len, &double_encode) == FAILURE) { return; } @@ -1485,10 +1485,10 @@ PHP_FUNCTION(htmlspecialchars_decode) char *str; zend_str_size str_len; zend_str_size new_len = 0; - long quote_style = ENT_COMPAT; + php_int_t quote_style = ENT_COMPAT; char *replaced; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, "e_style) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, "e_style) == FAILURE) { return; } @@ -1507,10 +1507,10 @@ PHP_FUNCTION(html_entity_decode) char *str, *hint_charset = NULL; zend_str_size str_len, hint_charset_len = 0; zend_str_size new_len = 0; - long quote_style = ENT_COMPAT; + php_int_t quote_style = ENT_COMPAT; char *replaced; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lS", &str, &str_len, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iS", &str, &str_len, "e_style, &hint_charset, &hint_charset_len) == FAILURE) { return; } @@ -1592,7 +1592,7 @@ static inline void write_s3row_data( Returns the internal translation table used by htmlspecialchars and htmlentities */ PHP_FUNCTION(get_html_translation_table) { - long all = HTML_SPECIALCHARS, + php_int_t all = HTML_SPECIALCHARS, flags = ENT_COMPAT; int doctype; entity_table_opt entity_table; @@ -1605,7 +1605,7 @@ PHP_FUNCTION(get_html_translation_table) * getting the translated table from data structures that are optimized for * random access, not traversal */ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|llS", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|iiS", &all, &flags, &charset_hint, &charset_hint_len) == FAILURE) { return; } diff --git a/ext/standard/http.c b/ext/standard/http.c index 8b9f46b..ce3814d 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -214,9 +214,9 @@ PHP_FUNCTION(http_build_query) char *prefix = NULL, *arg_sep=NULL; zend_str_size_int arg_sep_len = 0, prefix_len = 0; smart_str formstr = {0}; - long enc_type = PHP_QUERY_RFC1738; + php_int_t enc_type = PHP_QUERY_RFC1738; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|SSl", &formdata, &prefix, &prefix_len, &arg_sep, &arg_sep_len, &enc_type) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|SSi", &formdata, &prefix, &prefix_len, &arg_sep, &arg_sep_len, &enc_type) != SUCCESS) { RETURN_FALSE; } diff --git a/ext/standard/image.c b/ext/standard/image.c index a366330..6bc134c 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -1155,9 +1155,9 @@ PHPAPI char * php_image_type_to_mime_type(int image_type) Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype */ PHP_FUNCTION(image_type_to_mime_type) { - long p_image_type; + php_int_t p_image_type; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &p_image_type) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &p_image_type) == FAILURE) { return; } @@ -1169,10 +1169,10 @@ PHP_FUNCTION(image_type_to_mime_type) Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype */ PHP_FUNCTION(image_type_to_extension) { - long image_type; + php_int_t image_type; zend_bool inc_dot=1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|b", &image_type, &inc_dot) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i|b", &image_type, &inc_dot) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/info.c b/ext/standard/info.c index 6875c42..26eaae7 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -1138,9 +1138,9 @@ void register_phpinfo_constants(INIT_FUNC_ARGS) Output a page of useful information about PHP and the current request */ PHP_FUNCTION(phpinfo) { - long flag = PHP_INFO_ALL; + php_int_t flag = PHP_INFO_ALL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &flag) == FAILURE) { return; } @@ -1182,9 +1182,9 @@ PHP_FUNCTION(phpversion) Prints the list of people who've contributed to the PHP project */ PHP_FUNCTION(phpcredits) { - long flag = PHP_CREDITS_ALL; + php_int_t flag = PHP_CREDITS_ALL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &flag) == FAILURE) { return; } diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index f7cd4a9..4ae38d0 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -179,7 +179,7 @@ PHP_FUNCTION(iptcembed) { char *iptcdata, *jpeg_file; zend_str_size_int iptcdata_len, jpeg_file_len; - long spool = 0; + php_int_t spool = 0; FILE *fp; unsigned int marker, done = 0; int inx; @@ -187,7 +187,7 @@ PHP_FUNCTION(iptcembed) struct stat sb; zend_bool written = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SP|l", &iptcdata, &iptcdata_len, &jpeg_file, &jpeg_file_len, &spool) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SP|i", &iptcdata, &iptcdata_len, &jpeg_file, &jpeg_file_len, &spool) != SUCCESS) { return; } diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c index 355687b..b5ca544 100644 --- a/ext/standard/levenshtein.c +++ b/ext/standard/levenshtein.c @@ -95,7 +95,7 @@ PHP_FUNCTION(levenshtein) char *str1, *str2; char *callback_name; zend_str_size_int str1_len, str2_len, callback_len; - long cost_ins, cost_rep, cost_del; + php_int_t cost_ins, cost_rep, cost_del; int distance = -1; switch (argc) { @@ -107,7 +107,7 @@ PHP_FUNCTION(levenshtein) break; case 5: /* more general version: calc cost by ins/rep/del weights */ - if (zend_parse_parameters(5 TSRMLS_CC, "SSlll", &str1, &str1_len, &str2, &str2_len, &cost_ins, &cost_rep, &cost_del) == FAILURE) { + if (zend_parse_parameters(5 TSRMLS_CC, "SSiii", &str1, &str1_len, &str2, &str2_len, &cost_ins, &cost_rep, &cost_del) == FAILURE) { return; } distance = reference_levdist(str1, str1_len, str2, str2_len, cost_ins, cost_rep, cost_del); diff --git a/ext/standard/math.c b/ext/standard/math.c index 2192d96..654078a 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -344,11 +344,11 @@ PHP_FUNCTION(round) { zval **value; int places = 0; - long precision = 0; - long mode = PHP_ROUND_HALF_UP; + php_int_t precision = 0; + php_int_t mode = PHP_ROUND_HALF_UP; double return_val; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|ll", &value, &precision, &mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|ii", &value, &precision, &mode) == FAILURE) { return; } @@ -1065,10 +1065,10 @@ PHP_FUNCTION(dechex) PHP_FUNCTION(base_convert) { zval **number, temp; - long frombase, tobase; + php_int_t frombase, tobase; char *result; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zll", &number, &frombase, &tobase) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zii", &number, &frombase, &tobase) == FAILURE) { return; } convert_to_string_ex(number); @@ -1231,12 +1231,12 @@ PHPAPI char *_php_math_number_format_ex(double d, int dec, char *dec_point, PHP_FUNCTION(number_format) { double num; - long dec = 0; + php_int_t dec = 0; char *thousand_sep = NULL, *dec_point = NULL; char thousand_sep_chr = ',', dec_point_chr = '.'; zend_str_size thousand_sep_len = 0, dec_point_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|lS!S!", &num, &dec, &dec_point, &dec_point_len, &thousand_sep, &thousand_sep_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|iS!S!", &num, &dec, &dec_point, &dec_point_len, &thousand_sep, &thousand_sep_len) == FAILURE) { return; } diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index 5439e75..57264d5 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -34,9 +34,9 @@ PHP_FUNCTION(metaphone) char *str; char *result = 0; zend_str_size_int str_len; - long phones = 0; + php_int_t phones = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, &phones) == FAILURE) { return; } diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 219e35d..bdf1da8 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -111,10 +111,10 @@ PHP_FUNCTION(gettimeofday) PHP_FUNCTION(getrusage) { struct rusage usg; - long pwho = 0; + php_int_t pwho = 0; int who = RUSAGE_SELF; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &pwho) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &pwho) == FAILURE) { return; } diff --git a/ext/standard/password.c b/ext/standard/password.c index ac1f452..b9a5912 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -216,14 +216,14 @@ PHP_FUNCTION(password_get_info) PHP_FUNCTION(password_needs_rehash) { - long new_algo = 0; + php_int_t new_algo = 0; php_password_algo algo; zend_str_size_int hash_len; char *hash; HashTable *options = 0; zval **option_buffer; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl|H", &hash, &hash_len, &new_algo, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Si|H", &hash, &hash_len, &new_algo, &options) == FAILURE) { return; } @@ -308,13 +308,13 @@ Hash a password */ PHP_FUNCTION(password_hash) { char *hash_format, *hash, *salt, *password, *result; - long algo = 0; + php_int_t algo = 0; zend_str_size_int password_len = 0, hash_len; size_t salt_len = 0, required_salt_len = 0, hash_format_len; HashTable *options = 0; zval **option_buffer; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl|H", &password, &password_len, &algo, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Si|H", &password, &password_len, &algo, &options) == FAILURE) { return; } diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index f8ba3e5..54d1f44 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -273,9 +273,9 @@ PHP_FUNCTION(proc_terminate) { zval *zproc; struct php_process_handle *proc; - long sig_no = SIGTERM; + php_int_t sig_no = SIGTERM; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zproc, &sig_no) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|i", &zproc, &sig_no) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/rand.c b/ext/standard/rand.c index 5f55a41..9304b7b 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -230,9 +230,9 @@ PHPAPI php_uint32 php_mt_rand(TSRMLS_D) Seeds random number generator */ PHP_FUNCTION(srand) { - long seed = 0; + php_int_t seed = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &seed) == FAILURE) + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &seed) == FAILURE) return; if (ZEND_NUM_ARGS() == 0) @@ -246,9 +246,9 @@ PHP_FUNCTION(srand) Seeds Mersenne Twister random number generator */ PHP_FUNCTION(mt_srand) { - long seed = 0; + php_int_t seed = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &seed) == FAILURE) + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &seed) == FAILURE) return; if (ZEND_NUM_ARGS() == 0) @@ -289,12 +289,12 @@ PHP_FUNCTION(mt_srand) Returns a random number */ PHP_FUNCTION(rand) { - long min; - long max; - long number; + php_int_t min; + php_int_t max; + php_int_t number; int argc = ZEND_NUM_ARGS(); - if (argc != 0 && zend_parse_parameters(argc TSRMLS_CC, "ll", &min, &max) == FAILURE) + if (argc != 0 && zend_parse_parameters(argc TSRMLS_CC, "ii", &min, &max) == FAILURE) return; number = php_rand(TSRMLS_C); @@ -310,13 +310,13 @@ PHP_FUNCTION(rand) Returns a random number from Mersenne Twister */ PHP_FUNCTION(mt_rand) { - long min; - long max; - long number; + php_int_t min; + php_int_t max; + php_int_t number; int argc = ZEND_NUM_ARGS(); if (argc != 0) { - if (zend_parse_parameters(argc TSRMLS_CC, "ll", &min, &max) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ii", &min, &max) == FAILURE) { return; } else if (max < min) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "max(%ld) is smaller than min(%ld)", max, min); diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 7756804..7938058 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -49,11 +49,11 @@ static php_stream_context *decode_context_param(zval *contextresource TSRMLS_DC) Creates a pair of connected, indistinguishable socket streams */ PHP_FUNCTION(stream_socket_pair) { - long domain, type, protocol; + php_int_t domain, type, protocol; php_stream *s1, *s2; php_socket_t pair[2]; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "iii", &domain, &type, &protocol)) { RETURN_FALSE; } @@ -94,13 +94,13 @@ PHP_FUNCTION(stream_socket_client) char *hashkey = NULL; php_stream *stream = NULL; int err; - long flags = PHP_STREAM_CLIENT_CONNECT; + php_int_t flags = PHP_STREAM_CLIENT_CONNECT; char *errstr = NULL; php_stream_context *context = NULL; RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|zzdlr", &host, &host_len, &zerrno, &zerrstr, &timeout, &flags, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|zzdir", &host, &host_len, &zerrno, &zerrstr, &timeout, &flags, &zcontext) == FAILURE) { RETURN_FALSE; } @@ -179,13 +179,13 @@ PHP_FUNCTION(stream_socket_server) zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL; php_stream *stream = NULL; int err = 0; - long flags = STREAM_XPORT_BIND | STREAM_XPORT_LISTEN; + php_int_t flags = STREAM_XPORT_BIND | STREAM_XPORT_LISTEN; char *errstr = NULL; php_stream_context *context = NULL; RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|zzlr", &host, &host_len, &zerrno, &zerrstr, &flags, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|zzir", &host, &host_len, &zerrno, &zerrstr, &flags, &zcontext) == FAILURE) { RETURN_FALSE; } @@ -326,13 +326,13 @@ PHP_FUNCTION(stream_socket_sendto) { php_stream *stream; zval *zstream; - long flags = 0; + php_int_t flags = 0; char *data, *target_addr = NULL; zend_str_size datalen, target_addr_len = 0; php_sockaddr_storage sa; socklen_t sl = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rS|lS", &zstream, &data, &datalen, &flags, &target_addr, &target_addr_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rS|iS", &zstream, &data, &datalen, &flags, &target_addr, &target_addr_len) == FAILURE) { RETURN_FALSE; } php_stream_from_zval(stream, &zstream); @@ -357,12 +357,12 @@ PHP_FUNCTION(stream_socket_recvfrom) zval *zstream, *zremote = NULL; char *remote_addr = NULL; zend_str_size remote_addr_len; - long to_read = 0; + php_int_t to_read = 0; char *read_buf; - long flags = 0; - int recvd; + php_int_t flags = 0; + php_int_t recvd; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|lz", &zstream, &to_read, &flags, &zremote) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri|iz", &zstream, &to_read, &flags, &zremote) == FAILURE) { RETURN_FALSE; } @@ -405,12 +405,12 @@ PHP_FUNCTION(stream_get_contents) { php_stream *stream; zval *zsrc; - long maxlen = PHP_STREAM_COPY_ALL, + php_int_t maxlen = PHP_STREAM_COPY_ALL, desiredpos = -1L; zend_str_size len; char *contents = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|ll", &zsrc, &maxlen, &desiredpos) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|ii", &zsrc, &maxlen, &desiredpos) == FAILURE) { RETURN_FALSE; } @@ -452,11 +452,11 @@ PHP_FUNCTION(stream_copy_to_stream) { php_stream *src, *dest; zval *zsrc, *zdest; - long maxlen = PHP_STREAM_COPY_ALL, pos = 0; + php_int_t maxlen = PHP_STREAM_COPY_ALL, pos = 0; zend_str_size len; int ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|ll", &zsrc, &zdest, &maxlen, &pos) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|ii", &zsrc, &zdest, &maxlen, &pos) == FAILURE) { RETURN_FALSE; } @@ -775,10 +775,10 @@ PHP_FUNCTION(stream_select) fd_set rfds, wfds, efds; php_socket_t max_fd = 0; int retval, sets = 0; - long usec = 0; + php_int_t usec = 0; int set_count, max_set_count = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a!a!a!Z!|l", &r_array, &w_array, &e_array, &sec, &usec) == FAILURE) + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a!a!a!Z!|i", &r_array, &w_array, &e_array, &sec, &usec) == FAILURE) return; FD_ZERO(&rfds); @@ -1191,12 +1191,12 @@ static void apply_filter_to_stream(int append, INTERNAL_FUNCTION_PARAMETERS) php_stream *stream; char *filtername; zend_str_size filternamelen; - long read_write = 0; + php_int_t read_write = 0; zval *filterparams = NULL; php_stream_filter *filter = NULL; int ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rS|lz", &zstream, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rS|iz", &zstream, &filtername, &filternamelen, &read_write, &filterparams) == FAILURE) { RETURN_FALSE; } @@ -1313,13 +1313,13 @@ PHP_FUNCTION(stream_get_line) { char *str = NULL; zend_str_size str_len = 0; - long max_length; + php_int_t max_length; zval *zstream; char *buf; size_t buf_size; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|S", &zstream, &max_length, &str, &str_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri|S", &zstream, &max_length, &str, &str_len) == FAILURE) { RETURN_FALSE; } @@ -1348,10 +1348,10 @@ PHP_FUNCTION(stream_set_blocking) { zval *arg1; int block; - long arg2; + php_int_t arg2; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &arg1, &arg2) == FAILURE) { return; } @@ -1374,12 +1374,12 @@ PHP_FUNCTION(stream_set_blocking) PHP_FUNCTION(stream_set_timeout) { zval *socket; - long seconds, microseconds = 0; + php_int_t seconds, microseconds = 0; struct timeval t; php_stream *stream; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "rl|l", &socket, &seconds, µseconds) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ri|i", &socket, &seconds, µseconds) == FAILURE) { return; } @@ -1409,11 +1409,11 @@ PHP_FUNCTION(stream_set_write_buffer) { zval *arg1; int ret; - long arg2; + php_int_t arg2; size_t buff; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &arg1, &arg2) == FAILURE) { RETURN_FALSE; } @@ -1437,11 +1437,11 @@ PHP_FUNCTION(stream_set_write_buffer) PHP_FUNCTION(stream_set_chunk_size) { int ret; - long csize; + php_int_t csize; zval *zstream; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zstream, &csize) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &zstream, &csize) == FAILURE) { RETURN_FALSE; } @@ -1472,11 +1472,11 @@ PHP_FUNCTION(stream_set_read_buffer) { zval *arg1; int ret; - long arg2; + php_int_t arg2; size_t buff; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &arg1, &arg2) == FAILURE) { RETURN_FALSE; } @@ -1499,13 +1499,13 @@ PHP_FUNCTION(stream_set_read_buffer) Enable or disable a specific kind of crypto on the stream */ PHP_FUNCTION(stream_socket_enable_crypto) { - long cryptokind = 0; + php_int_t cryptokind = 0; zval *zstream, *zsessstream = NULL; php_stream *stream, *sessstream = NULL; zend_bool enable; int ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb|lr", &zstream, &enable, &cryptokind, &zsessstream) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb|ir", &zstream, &enable, &cryptokind, &zsessstream) == FAILURE) { RETURN_FALSE; } @@ -1619,11 +1619,11 @@ PHP_FUNCTION(stream_supports_lock) disallowed. */ PHP_FUNCTION(stream_socket_shutdown) { - long how; + php_int_t how; zval *zstream; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zstream, &how) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &zstream, &how) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/string.c b/ext/standard/string.c index 9845645..6ec35dc 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -286,9 +286,9 @@ static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior) / { char *s11, *s22; zend_str_size len1, len2; - long start = 0, len = 0; + php_int_t start = 0, len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|ll", &s11, &len1, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|ii", &s11, &len1, &s22, &len2, &start, &len) == FAILURE) { return; } @@ -528,10 +528,10 @@ PHP_MINIT_FUNCTION(nl_langinfo) Query language and locale information */ PHP_FUNCTION(nl_langinfo) { - long item; + php_int_t item; char *value; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &item) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &item) == FAILURE) { return; } @@ -874,11 +874,11 @@ PHP_FUNCTION(wordwrap) char *newtext; zend_str_size textlen, breakcharlen = 1, newtextlen, chk; zend_str_size alloced; - long current = 0, laststart = 0, lastspace = 0; - long linelength = 75; + php_int_t current = 0, laststart = 0, lastspace = 0; + php_int_t linelength = 75; zend_bool docut = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lSb", &text, &textlen, &linelength, &breakchar, &breakcharlen, &docut) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iSb", &text, &textlen, &linelength, &breakchar, &breakcharlen, &docut) == FAILURE) { return; } @@ -1529,9 +1529,9 @@ PHP_FUNCTION(pathinfo) char *path, *ret = NULL; zend_str_size path_len, ret_len; int have_basename; - long opt = PHP_PATHINFO_ALL; + php_int_t opt = PHP_PATHINFO_ALL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &path, &path_len, &opt) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &path, &path_len, &opt) == FAILURE) { return; } @@ -1846,12 +1846,12 @@ PHP_FUNCTION(stripos) char *found = NULL; char *haystack; zend_str_size haystack_len; - long offset = 0; + php_int_t offset = 0; char *needle_dup = NULL, *haystack_dup; char needle_char[2]; zval *needle; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|l", &haystack, &haystack_len, &needle, &offset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|i", &haystack, &haystack_len, &needle, &offset) == FAILURE) { return; } @@ -1909,10 +1909,10 @@ PHP_FUNCTION(strrpos) zval *zneedle; char *needle, *haystack; zend_str_size needle_len, haystack_len; - long offset = 0; + php_int_t offset = 0; char *p, *e, ord_needle[2]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|l", &haystack, &haystack_len, &zneedle, &offset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|i", &haystack, &haystack_len, &zneedle, &offset) == FAILURE) { RETURN_FALSE; } @@ -1982,11 +1982,11 @@ PHP_FUNCTION(strripos) zval *zneedle; char *needle, *haystack; zend_str_size needle_len, haystack_len; - long offset = 0; + php_int_t offset = 0; char *p, *e, ord_needle[2]; char *needle_dup, *haystack_dup; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|l", &haystack, &haystack_len, &zneedle, &offset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|i", &haystack, &haystack_len, &zneedle, &offset) == FAILURE) { RETURN_FALSE; } @@ -2173,11 +2173,11 @@ PHP_FUNCTION(chunk_split) char *result; char *end = "\r\n"; zend_str_size endlen = 2; - long chunklen = 76; + php_int_t chunklen = 76; zend_str_size result_len; zend_str_size str_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lS", &str, &str_len, &chunklen, &end, &endlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iS", &str, &str_len, &chunklen, &end, &endlen) == FAILURE) { return; } @@ -4029,11 +4029,11 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines) char *str; char *heb_str, *tmp, *target, *broken_str; zend_str_size block_start, block_end, block_type, block_length, i; - long max_chars=0; + php_int_t max_chars=0; zend_str_size begin, end, char_count, orig_begin; zend_str_size str_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, &max_chars) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, &max_chars) == FAILURE) { return; } @@ -4906,14 +4906,14 @@ PHP_FUNCTION(count_chars) { char *input; int chars[256]; - long mymode=0; + php_int_t mymode=0; unsigned char *buf; zend_str_size len; int inx; char retstr[256]; zend_str_size retlen=0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &input, &len, &mymode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &input, &len, &mymode) == FAILURE) { return; } @@ -5136,13 +5136,13 @@ PHP_FUNCTION(strnatcasecmp) PHP_FUNCTION(substr_count) { char *haystack, *needle; - long offset = 0, length = 0; + php_int_t offset = 0, length = 0; int ac = ZEND_NUM_ARGS(); - int count = 0; + php_int_t count = 0; zend_str_size haystack_len, needle_len; char *p, *endp, cmp; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|ll", &haystack, &haystack_len, &needle, &needle_len, &offset, &length) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|ii", &haystack, &haystack_len, &needle, &needle_len, &offset, &length) == FAILURE) { return; } @@ -5382,9 +5382,9 @@ PHP_FUNCTION(str_word_count) { char *buf, *str, *char_list = NULL, *p, *e, *s, ch[256]; zend_str_size str_len, char_list_len = 0, word_count = 0; - long type = 0; + php_int_t type = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lS", &str, &str_len, &type, &char_list, &char_list_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iS", &str, &str_len, &type, &char_list, &char_list_len) == FAILURE) { return; } @@ -5501,11 +5501,11 @@ PHP_FUNCTION(str_split) { char *str; zend_str_size str_len; - long split_length = 1; + php_int_t split_length = 1; char *p; zend_str_size n_reg_segments; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, &split_length) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, &split_length) == FAILURE) { return; } @@ -5572,11 +5572,11 @@ PHP_FUNCTION(substr_compare) { char *s1, *s2; zend_str_size s1_len, s2_len; - long offset, len=0; + php_int_t offset, len=0; zend_bool cs=0; zend_str_size cmp_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SSl|lb", &s1, &s1_len, &s2, &s2_len, &offset, &len, &cs) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SSi|ib", &s1, &s1_len, &s2, &s2_len, &offset, &len, &cs) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 9fc0848..6a57f4d 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -135,10 +135,10 @@ PHP_MSHUTDOWN_FUNCTION(syslog) PHP_FUNCTION(openlog) { char *ident; - long option, facility; + php_int_t option, facility; zend_str_size_int ident_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sll", &ident, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sii", &ident, &ident_len, &option, &facility) == FAILURE) { return; } @@ -175,11 +175,11 @@ PHP_FUNCTION(closelog) Generate a system log message */ PHP_FUNCTION(syslog) { - long priority; + php_int_t priority; char *message; zend_str_size_int message_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lS", &priority, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "iS", &priority, &message, &message_len) == FAILURE) { return; } diff --git a/ext/standard/type.c b/ext/standard/type.c index 12fcd64..23533eb 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -134,7 +134,7 @@ PHP_FUNCTION(settype) PHP_FUNCTION(intval) { zval **num; - long arg_base; + php_int_t arg_base; int base; switch (ZEND_NUM_ARGS()) { @@ -146,7 +146,7 @@ PHP_FUNCTION(intval) break; case 2: - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zl", &num, &arg_base) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zi", &num, &arg_base) == FAILURE) { return; } base = arg_base; diff --git a/ext/standard/url.c b/ext/standard/url.c index 16069ba..b8af28d 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -377,9 +377,9 @@ PHP_FUNCTION(parse_url) char *str; zend_str_size_int str_len; php_url *resource; - long key = -1; + php_int_t key = -1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, &key) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, &key) == FAILURE) { return; } @@ -705,9 +705,9 @@ PHP_FUNCTION(get_headers) zval **prev_val, **hdr = NULL, **h; HashPosition pos; HashTable *hashT; - long format = 0; + php_int_t format = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &url, &url_len, &format) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &url, &url_len, &format) == FAILURE) { return; } context = FG(default_context) ? FG(default_context) : (FG(default_context) = php_stream_context_alloc(TSRMLS_C)); diff --git a/main/SAPI.h b/main/SAPI.h index b595d27..ddcb98a 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -168,7 +168,7 @@ END_EXTERN_C() typedef struct { char *line; /* If you allocated this, you need to free it yourself */ zend_str_size_uint line_len; - long response_code; /* long due to zend_parse_parameters compatibility */ + php_int_t response_code; /* long due to zend_parse_parameters compatibility */ } sapi_header_line; typedef enum { /* Parameter: */
diff --git a/ext/standard/array.c b/ext/standard/array.c index df9836e..3987242 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -258,7 +258,7 @@ PHP_FUNCTION(ksort) zval *array; php_int_t sort_type = PHP_SORT_REGULAR; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &array, &sort_type) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|i", &array, &sort_type) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/assert.c b/ext/standard/assert.c index a67d8af..7ecfd5e 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -265,11 +265,11 @@ PHP_FUNCTION(assert) PHP_FUNCTION(assert_options) { zval **value = NULL; - long what; + php_int_t what; int oldint; int ac = ZEND_NUM_ARGS(); - if (zend_parse_parameters(ac TSRMLS_CC, "l|Z", &what, &value) == FAILURE) { + if (zend_parse_parameters(ac TSRMLS_CC, "i|Z", &what, &value) == FAILURE) { return; } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index b4aaf7d..da8e87e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4441,9 +4441,9 @@ PHP_FUNCTION(flush) Delay for a given number of seconds */ PHP_FUNCTION(sleep) { - long num; + php_int_t num; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &num) == FAILURE) { RETURN_FALSE; } if (num < 0) { @@ -4464,9 +4464,9 @@ PHP_FUNCTION(sleep) PHP_FUNCTION(usleep) { #if HAVE_USLEEP - long num; + php_int_t num; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &num) == FAILURE) { return; } if (num < 0) { @@ -4483,10 +4483,10 @@ PHP_FUNCTION(usleep) Delay for a number of seconds and nano seconds */ PHP_FUNCTION(time_nanosleep) { - long tv_sec, tv_nsec; + php_int_t tv_sec, tv_nsec; struct timespec php_req, php_rem; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &tv_sec, &tv_nsec) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ii", &tv_sec, &tv_nsec) == FAILURE) { return; } @@ -5648,10 +5648,10 @@ PHP_FUNCTION(getservbyport) { char *proto; zend_str_size proto_len; - long port; + php_int_t port; struct servent *serv; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lS", &port, &proto, &proto_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "iS", &port, &proto, &proto_len) == FAILURE) { return; } @@ -5695,10 +5695,10 @@ PHP_FUNCTION(getprotobyname) Returns protocol name associated with protocol number proto */ PHP_FUNCTION(getprotobynumber) { - long proto; + php_int_t proto; struct protoent *ent; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &proto) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &proto) == FAILURE) { return; } @@ -6015,10 +6015,10 @@ PHP_FUNCTION(parse_ini_string) char *string = NULL, *str = NULL; zend_str_size str_len = 0; zend_bool process_sections = 0; - long scanner_mode = ZEND_INI_SCANNER_NORMAL; + php_int_t scanner_mode = ZEND_INI_SCANNER_NORMAL; zend_ini_parser_cb_t ini_parser_cb; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|bl", &str, &str_len, &process_sections, &scanner_mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|bi", &str, &str_len, &process_sections, &scanner_mode) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/dir.c b/ext/standard/dir.c index b65a46d..2015cc4 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -432,13 +432,13 @@ PHP_FUNCTION(glob) #endif char *pattern = NULL; zend_str_size pattern_len; - long flags = 0; + php_int_t flags = 0; glob_t globbuf; int n; int ret; zend_bool basedir_limit = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|l", &pattern, &pattern_len, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|i", &pattern, &pattern_len, &flags) == FAILURE) { return; } @@ -555,13 +555,13 @@ PHP_FUNCTION(scandir) { char *dirn; zend_str_size dirn_len; - long flags = 0; + php_int_t flags = 0; char **namelist; int n, i; zval *zcontext = NULL; php_stream_context *context = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|lr", &dirn, &dirn_len, &flags, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|ir", &dirn, &dirn_len, &flags, &zcontext) == FAILURE) { return; } diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 136ef0f..5aa0a11 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -715,7 +715,7 @@ PHP_FUNCTION(dns_get_record) { char *hostname; zend_str_size_int hostname_len; - long type_param = PHP_DNS_ANY; + php_int_t type_param = PHP_DNS_ANY; zval *authns = NULL, *addtl = NULL; int type_to_fetch; #if defined(HAVE_DNS_SEARCH) @@ -733,7 +733,7 @@ PHP_FUNCTION(dns_get_record) int type, first_query = 1, store_results = 1; zend_bool raw = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lz!z!b", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iz!z!b", &hostname, &hostname_len, &type_param, &authns, &addtl, &raw) == FAILURE) { return; } diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index 08d7e6c..70ca762 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -349,12 +349,12 @@ PHP_FUNCTION(dns_get_record) { char *hostname; zend_str_size_int hostname_len; - long type_param = PHP_DNS_ANY; + php_int_t type_param = PHP_DNS_ANY; zval *authns = NULL, *addtl = NULL; int type, type_to_fetch, first_query = 1, store_results = 1; zend_bool raw = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lz!z!b", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iz!z!b", &hostname, &hostname_len, &type_param, &authns, &addtl, &raw) == FAILURE) { return; } diff --git a/ext/standard/exec.c b/ext/standard/exec.c index a5f702f..d5f921a 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -471,9 +471,9 @@ PHP_FUNCTION(shell_exec) Change the priority of the current process */ PHP_FUNCTION(proc_nice) { - long pri; + php_int_t pri; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &pri) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &pri) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/file.c b/ext/standard/file.c index 144270f..a01b421 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -334,9 +334,9 @@ PHP_FUNCTION(flock) zval *arg1, *arg3 = NULL; int act; php_stream *stream; - long operation = 0; + php_int_t operation = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &arg1, &operation, &arg3) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri|z", &arg1, &operation, &arg3) == FAILURE) { return; } @@ -520,13 +520,13 @@ PHP_FUNCTION(file_get_contents) zend_bool use_include_path = 0; php_stream *stream; zend_str_size len; - long offset = -1; - long maxlen = PHP_STREAM_COPY_ALL; + php_int_t offset = -1; + php_int_t maxlen = PHP_STREAM_COPY_ALL; zval *zcontext = NULL; php_stream_context *context = NULL; /* Parse arguments */ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|br!ll", &filename, &filename_len, &use_include_path, &zcontext, &offset, &maxlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|br!ii", &filename, &filename_len, &use_include_path, &zcontext, &offset, &maxlen) == FAILURE) { return; } @@ -713,7 +713,7 @@ PHP_FUNCTION(file) register int i = 0; zend_str_size target_len; char eol_marker = '\n'; - long flags = 0; + php_int_t flags = 0; zend_bool use_include_path; zend_bool include_new_line; zend_bool skip_blank_lines; @@ -722,7 +722,7 @@ PHP_FUNCTION(file) php_stream_context *context = NULL; /* Parse arguments */ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|lr!", &filename, &filename_len, &flags, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|ir!", &filename, &filename_len, &flags, &zcontext) == FAILURE) { return; } if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | PHP_FILE_NO_DEFAULT_CONTEXT)) { @@ -994,13 +994,13 @@ PHPAPI PHP_FUNCTION(feof) PHPAPI PHP_FUNCTION(fgets) { zval *arg1; - long len = 1024; + php_int_t len = 1024; char *buf = NULL; int argc = ZEND_NUM_ARGS(); size_t line_len = 0; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &arg1, &len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|i", &arg1, &len) == FAILURE) { RETURN_FALSE; } @@ -1073,7 +1073,7 @@ PHPAPI PHP_FUNCTION(fgetc) PHPAPI PHP_FUNCTION(fgetss) { zval *fd; - long bytes = 0; + php_int_t bytes = 0; zend_str_size len = 0; zend_str_size actual_len, retval_len; char *buf = NULL, *retval; @@ -1081,7 +1081,7 @@ PHPAPI PHP_FUNCTION(fgetss) char *allowed_tags=NULL; zend_str_size allowed_tags_len=0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|lS", &fd, &bytes, &allowed_tags, &allowed_tags_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|iS", &fd, &bytes, &allowed_tags, &allowed_tags_len) == FAILURE) { RETURN_FALSE; } @@ -1318,11 +1318,11 @@ PHP_FUNCTION(mkdir) char *dir; zend_str_size dir_len; zval *zcontext = NULL; - long mode = 0777; + php_int_t mode = 0777; zend_bool recursive = 0; php_stream_context *context; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|lbr", &dir, &dir_len, &mode, &recursive, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|ibr", &dir, &dir_len, &mode, &recursive, &zcontext) == FAILURE) { RETURN_FALSE; } @@ -1384,7 +1384,7 @@ PHP_FUNCTION(readfile) Return or change the umask */ PHP_FUNCTION(umask) { - long arg1 = 0; + php_int_t arg1 = 0; int oldumask; oldumask = umask(077); @@ -1392,8 +1392,8 @@ PHP_FUNCTION(umask) if (BG(umask) == -1) { BG(umask) = oldumask; } - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &arg1) == FAILURE) { + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &arg1) == FAILURE) { RETURN_FALSE; } @@ -1499,10 +1499,10 @@ PHP_FUNCTION(unlink) PHP_NAMED_FUNCTION(php_if_ftruncate) { zval *fp; - long size; + php_int_t size; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &fp, &size) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &fp, &size) == FAILURE) { RETURN_FALSE; } @@ -2440,9 +2440,9 @@ PHP_FUNCTION(fnmatch) { char *pattern, *filename; zend_str_size pattern_len, filename_len; - long flags = 0; + php_int_t flags = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "PP|l", &pattern, &pattern_len, &filename, &filename_len, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "PP|i", &pattern, &pattern_len, &filename, &filename_len, &flags) == FAILURE) { return; } diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index eec9819..9f71a99 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -33,7 +33,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent) { char *host; zend_str_size_int host_len; - long port = -1; + php_int_t port = -1; zval *zerrno = NULL, *zerrstr = NULL; double timeout = FG(default_socket_timeout); unsigned long conv; @@ -47,7 +47,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent) RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lzzd", &host, &host_len, &port, &zerrno, &zerrstr, &timeout) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|izzd", &host, &host_len, &port, &zerrno, &zerrstr, &timeout) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/head.c b/ext/standard/head.c index f84079b..0ea8e3d 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -41,7 +41,7 @@ PHP_FUNCTION(header) zend_bool rep = 1; sapi_header_line ctr = {0}; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|bl", &ctr.line, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|bi", &ctr.line, &ctr.line_len, &rep, &ctr.response_code) == FAILURE) return; @@ -178,11 +178,11 @@ PHPAPI int php_setcookie(char *name, zend_str_size_int name_len, char *value, ze PHP_FUNCTION(setcookie) { char *name, *value = NULL, *path = NULL, *domain = NULL; - long expires = 0; + php_int_t expires = 0; zend_bool secure = 0, httponly = 0; zend_str_size_int name_len, value_len = 0, path_len = 0, domain_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SlSSbb", &name, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SiSSbb", &name, &name_len, &value, &value_len, &expires, &path, &path_len, &domain, &domain_len, &secure, &httponly) == FAILURE) { return; @@ -201,11 +201,11 @@ PHP_FUNCTION(setcookie) PHP_FUNCTION(setrawcookie) { char *name, *value = NULL, *path = NULL, *domain = NULL; - long expires = 0; + php_int_t expires = 0; zend_bool secure = 0, httponly = 0; zend_str_size_int name_len, value_len = 0, path_len = 0, domain_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SlSSbb", &name, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SiSSbb", &name, &name_len, &value, &value_len, &expires, &path, &path_len, &domain, &domain_len, &secure, &httponly) == FAILURE) { return; @@ -289,9 +289,9 @@ PHP_FUNCTION(headers_list) Sets a response code, or returns the current HTTP response code */ PHP_FUNCTION(http_response_code) { - long response_code = 0; + php_int_t response_code = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &response_code) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &response_code) == FAILURE) { return; } diff --git a/ext/standard/html.c b/ext/standard/html.c index c00f90c..3582318 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1435,11 +1435,11 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all) char *str, *hint_charset = NULL; zend_str_size str_len, hint_charset_len = 0; size_t new_len; - long flags = ENT_COMPAT; + php_int_t flags = ENT_COMPAT; char *replaced; zend_bool double_encode = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lS!b", &str, &str_len, &flags, &hint_charset, &hint_charset_len, &double_encode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iS!b", &str, &str_len, &flags, &hint_charset, &hint_charset_len, &double_encode) == FAILURE) { return; } @@ -1485,10 +1485,10 @@ PHP_FUNCTION(htmlspecialchars_decode) char *str; zend_str_size str_len; zend_str_size new_len = 0; - long quote_style = ENT_COMPAT; + php_int_t quote_style = ENT_COMPAT; char *replaced; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, "e_style) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, "e_style) == FAILURE) { return; } @@ -1507,10 +1507,10 @@ PHP_FUNCTION(html_entity_decode) char *str, *hint_charset = NULL; zend_str_size str_len, hint_charset_len = 0; zend_str_size new_len = 0; - long quote_style = ENT_COMPAT; + php_int_t quote_style = ENT_COMPAT; char *replaced; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lS", &str, &str_len, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iS", &str, &str_len, "e_style, &hint_charset, &hint_charset_len) == FAILURE) { return; } @@ -1592,7 +1592,7 @@ static inline void write_s3row_data( Returns the internal translation table used by htmlspecialchars and htmlentities */ PHP_FUNCTION(get_html_translation_table) { - long all = HTML_SPECIALCHARS, + php_int_t all = HTML_SPECIALCHARS, flags = ENT_COMPAT; int doctype; entity_table_opt entity_table; @@ -1605,7 +1605,7 @@ PHP_FUNCTION(get_html_translation_table) * getting the translated table from data structures that are optimized for * random access, not traversal */ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|llS", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|iiS", &all, &flags, &charset_hint, &charset_hint_len) == FAILURE) { return; } diff --git a/ext/standard/http.c b/ext/standard/http.c index 8b9f46b..ce3814d 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -214,9 +214,9 @@ PHP_FUNCTION(http_build_query) char *prefix = NULL, *arg_sep=NULL; zend_str_size_int arg_sep_len = 0, prefix_len = 0; smart_str formstr = {0}; - long enc_type = PHP_QUERY_RFC1738; + php_int_t enc_type = PHP_QUERY_RFC1738; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|SSl", &formdata, &prefix, &prefix_len, &arg_sep, &arg_sep_len, &enc_type) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|SSi", &formdata, &prefix, &prefix_len, &arg_sep, &arg_sep_len, &enc_type) != SUCCESS) { RETURN_FALSE; } diff --git a/ext/standard/image.c b/ext/standard/image.c index a366330..6bc134c 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -1155,9 +1155,9 @@ PHPAPI char * php_image_type_to_mime_type(int image_type) Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype */ PHP_FUNCTION(image_type_to_mime_type) { - long p_image_type; + php_int_t p_image_type; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &p_image_type) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &p_image_type) == FAILURE) { return; } @@ -1169,10 +1169,10 @@ PHP_FUNCTION(image_type_to_mime_type) Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype */ PHP_FUNCTION(image_type_to_extension) { - long image_type; + php_int_t image_type; zend_bool inc_dot=1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|b", &image_type, &inc_dot) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i|b", &image_type, &inc_dot) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/info.c b/ext/standard/info.c index 6875c42..26eaae7 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -1138,9 +1138,9 @@ void register_phpinfo_constants(INIT_FUNC_ARGS) Output a page of useful information about PHP and the current request */ PHP_FUNCTION(phpinfo) { - long flag = PHP_INFO_ALL; + php_int_t flag = PHP_INFO_ALL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &flag) == FAILURE) { return; } @@ -1182,9 +1182,9 @@ PHP_FUNCTION(phpversion) Prints the list of people who've contributed to the PHP project */ PHP_FUNCTION(phpcredits) { - long flag = PHP_CREDITS_ALL; + php_int_t flag = PHP_CREDITS_ALL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &flag) == FAILURE) { return; } diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index f7cd4a9..4ae38d0 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -179,7 +179,7 @@ PHP_FUNCTION(iptcembed) { char *iptcdata, *jpeg_file; zend_str_size_int iptcdata_len, jpeg_file_len; - long spool = 0; + php_int_t spool = 0; FILE *fp; unsigned int marker, done = 0; int inx; @@ -187,7 +187,7 @@ PHP_FUNCTION(iptcembed) struct stat sb; zend_bool written = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SP|l", &iptcdata, &iptcdata_len, &jpeg_file, &jpeg_file_len, &spool) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SP|i", &iptcdata, &iptcdata_len, &jpeg_file, &jpeg_file_len, &spool) != SUCCESS) { return; } diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c index 355687b..b5ca544 100644 --- a/ext/standard/levenshtein.c +++ b/ext/standard/levenshtein.c @@ -95,7 +95,7 @@ PHP_FUNCTION(levenshtein) char *str1, *str2; char *callback_name; zend_str_size_int str1_len, str2_len, callback_len; - long cost_ins, cost_rep, cost_del; + php_int_t cost_ins, cost_rep, cost_del; int distance = -1; switch (argc) { @@ -107,7 +107,7 @@ PHP_FUNCTION(levenshtein) break; case 5: /* more general version: calc cost by ins/rep/del weights */ - if (zend_parse_parameters(5 TSRMLS_CC, "SSlll", &str1, &str1_len, &str2, &str2_len, &cost_ins, &cost_rep, &cost_del) == FAILURE) { + if (zend_parse_parameters(5 TSRMLS_CC, "SSiii", &str1, &str1_len, &str2, &str2_len, &cost_ins, &cost_rep, &cost_del) == FAILURE) { return; } distance = reference_levdist(str1, str1_len, str2, str2_len, cost_ins, cost_rep, cost_del); diff --git a/ext/standard/math.c b/ext/standard/math.c index 2192d96..654078a 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -344,11 +344,11 @@ PHP_FUNCTION(round) { zval **value; int places = 0; - long precision = 0; - long mode = PHP_ROUND_HALF_UP; + php_int_t precision = 0; + php_int_t mode = PHP_ROUND_HALF_UP; double return_val; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|ll", &value, &precision, &mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|ii", &value, &precision, &mode) == FAILURE) { return; } @@ -1065,10 +1065,10 @@ PHP_FUNCTION(dechex) PHP_FUNCTION(base_convert) { zval **number, temp; - long frombase, tobase; + php_int_t frombase, tobase; char *result; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zll", &number, &frombase, &tobase) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zii", &number, &frombase, &tobase) == FAILURE) { return; } convert_to_string_ex(number); @@ -1231,12 +1231,12 @@ PHPAPI char *_php_math_number_format_ex(double d, int dec, char *dec_point, PHP_FUNCTION(number_format) { double num; - long dec = 0; + php_int_t dec = 0; char *thousand_sep = NULL, *dec_point = NULL; char thousand_sep_chr = ',', dec_point_chr = '.'; zend_str_size thousand_sep_len = 0, dec_point_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|lS!S!", &num, &dec, &dec_point, &dec_point_len, &thousand_sep, &thousand_sep_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d|iS!S!", &num, &dec, &dec_point, &dec_point_len, &thousand_sep, &thousand_sep_len) == FAILURE) { return; } diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index 5439e75..57264d5 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -34,9 +34,9 @@ PHP_FUNCTION(metaphone) char *str; char *result = 0; zend_str_size_int str_len; - long phones = 0; + php_int_t phones = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, &phones) == FAILURE) { return; } diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 219e35d..bdf1da8 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -111,10 +111,10 @@ PHP_FUNCTION(gettimeofday) PHP_FUNCTION(getrusage) { struct rusage usg; - long pwho = 0; + php_int_t pwho = 0; int who = RUSAGE_SELF; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &pwho) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &pwho) == FAILURE) { return; } diff --git a/ext/standard/password.c b/ext/standard/password.c index ac1f452..b9a5912 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -216,14 +216,14 @@ PHP_FUNCTION(password_get_info) PHP_FUNCTION(password_needs_rehash) { - long new_algo = 0; + php_int_t new_algo = 0; php_password_algo algo; zend_str_size_int hash_len; char *hash; HashTable *options = 0; zval **option_buffer; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl|H", &hash, &hash_len, &new_algo, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Si|H", &hash, &hash_len, &new_algo, &options) == FAILURE) { return; } @@ -308,13 +308,13 @@ Hash a password */ PHP_FUNCTION(password_hash) { char *hash_format, *hash, *salt, *password, *result; - long algo = 0; + php_int_t algo = 0; zend_str_size_int password_len = 0, hash_len; size_t salt_len = 0, required_salt_len = 0, hash_format_len; HashTable *options = 0; zval **option_buffer; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl|H", &password, &password_len, &algo, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Si|H", &password, &password_len, &algo, &options) == FAILURE) { return; } diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index f8ba3e5..54d1f44 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -273,9 +273,9 @@ PHP_FUNCTION(proc_terminate) { zval *zproc; struct php_process_handle *proc; - long sig_no = SIGTERM; + php_int_t sig_no = SIGTERM; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zproc, &sig_no) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|i", &zproc, &sig_no) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/rand.c b/ext/standard/rand.c index 5f55a41..9304b7b 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -230,9 +230,9 @@ PHPAPI php_uint32 php_mt_rand(TSRMLS_D) Seeds random number generator */ PHP_FUNCTION(srand) { - long seed = 0; + php_int_t seed = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &seed) == FAILURE) + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &seed) == FAILURE) return; if (ZEND_NUM_ARGS() == 0) @@ -246,9 +246,9 @@ PHP_FUNCTION(srand) Seeds Mersenne Twister random number generator */ PHP_FUNCTION(mt_srand) { - long seed = 0; + php_int_t seed = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &seed) == FAILURE) + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &seed) == FAILURE) return; if (ZEND_NUM_ARGS() == 0) @@ -289,12 +289,12 @@ PHP_FUNCTION(mt_srand) Returns a random number */ PHP_FUNCTION(rand) { - long min; - long max; - long number; + php_int_t min; + php_int_t max; + php_int_t number; int argc = ZEND_NUM_ARGS(); - if (argc != 0 && zend_parse_parameters(argc TSRMLS_CC, "ll", &min, &max) == FAILURE) + if (argc != 0 && zend_parse_parameters(argc TSRMLS_CC, "ii", &min, &max) == FAILURE) return; number = php_rand(TSRMLS_C); @@ -310,13 +310,13 @@ PHP_FUNCTION(rand) Returns a random number from Mersenne Twister */ PHP_FUNCTION(mt_rand) { - long min; - long max; - long number; + php_int_t min; + php_int_t max; + php_int_t number; int argc = ZEND_NUM_ARGS(); if (argc != 0) { - if (zend_parse_parameters(argc TSRMLS_CC, "ll", &min, &max) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ii", &min, &max) == FAILURE) { return; } else if (max < min) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "max(%ld) is smaller than min(%ld)", max, min); diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 7756804..7938058 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -49,11 +49,11 @@ static php_stream_context *decode_context_param(zval *contextresource TSRMLS_DC) Creates a pair of connected, indistinguishable socket streams */ PHP_FUNCTION(stream_socket_pair) { - long domain, type, protocol; + php_int_t domain, type, protocol; php_stream *s1, *s2; php_socket_t pair[2]; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "iii", &domain, &type, &protocol)) { RETURN_FALSE; } @@ -94,13 +94,13 @@ PHP_FUNCTION(stream_socket_client) char *hashkey = NULL; php_stream *stream = NULL; int err; - long flags = PHP_STREAM_CLIENT_CONNECT; + php_int_t flags = PHP_STREAM_CLIENT_CONNECT; char *errstr = NULL; php_stream_context *context = NULL; RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|zzdlr", &host, &host_len, &zerrno, &zerrstr, &timeout, &flags, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|zzdir", &host, &host_len, &zerrno, &zerrstr, &timeout, &flags, &zcontext) == FAILURE) { RETURN_FALSE; } @@ -179,13 +179,13 @@ PHP_FUNCTION(stream_socket_server) zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL; php_stream *stream = NULL; int err = 0; - long flags = STREAM_XPORT_BIND | STREAM_XPORT_LISTEN; + php_int_t flags = STREAM_XPORT_BIND | STREAM_XPORT_LISTEN; char *errstr = NULL; php_stream_context *context = NULL; RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|zzlr", &host, &host_len, &zerrno, &zerrstr, &flags, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|zzir", &host, &host_len, &zerrno, &zerrstr, &flags, &zcontext) == FAILURE) { RETURN_FALSE; } @@ -326,13 +326,13 @@ PHP_FUNCTION(stream_socket_sendto) { php_stream *stream; zval *zstream; - long flags = 0; + php_int_t flags = 0; char *data, *target_addr = NULL; zend_str_size datalen, target_addr_len = 0; php_sockaddr_storage sa; socklen_t sl = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rS|lS", &zstream, &data, &datalen, &flags, &target_addr, &target_addr_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rS|iS", &zstream, &data, &datalen, &flags, &target_addr, &target_addr_len) == FAILURE) { RETURN_FALSE; } php_stream_from_zval(stream, &zstream); @@ -357,12 +357,12 @@ PHP_FUNCTION(stream_socket_recvfrom) zval *zstream, *zremote = NULL; char *remote_addr = NULL; zend_str_size remote_addr_len; - long to_read = 0; + php_int_t to_read = 0; char *read_buf; - long flags = 0; - int recvd; + php_int_t flags = 0; + php_int_t recvd; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|lz", &zstream, &to_read, &flags, &zremote) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri|iz", &zstream, &to_read, &flags, &zremote) == FAILURE) { RETURN_FALSE; } @@ -405,12 +405,12 @@ PHP_FUNCTION(stream_get_contents) { php_stream *stream; zval *zsrc; - long maxlen = PHP_STREAM_COPY_ALL, + php_int_t maxlen = PHP_STREAM_COPY_ALL, desiredpos = -1L; zend_str_size len; char *contents = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|ll", &zsrc, &maxlen, &desiredpos) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|ii", &zsrc, &maxlen, &desiredpos) == FAILURE) { RETURN_FALSE; } @@ -452,11 +452,11 @@ PHP_FUNCTION(stream_copy_to_stream) { php_stream *src, *dest; zval *zsrc, *zdest; - long maxlen = PHP_STREAM_COPY_ALL, pos = 0; + php_int_t maxlen = PHP_STREAM_COPY_ALL, pos = 0; zend_str_size len; int ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|ll", &zsrc, &zdest, &maxlen, &pos) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|ii", &zsrc, &zdest, &maxlen, &pos) == FAILURE) { RETURN_FALSE; } @@ -775,10 +775,10 @@ PHP_FUNCTION(stream_select) fd_set rfds, wfds, efds; php_socket_t max_fd = 0; int retval, sets = 0; - long usec = 0; + php_int_t usec = 0; int set_count, max_set_count = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a!a!a!Z!|l", &r_array, &w_array, &e_array, &sec, &usec) == FAILURE) + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a!a!a!Z!|i", &r_array, &w_array, &e_array, &sec, &usec) == FAILURE) return; FD_ZERO(&rfds); @@ -1191,12 +1191,12 @@ static void apply_filter_to_stream(int append, INTERNAL_FUNCTION_PARAMETERS) php_stream *stream; char *filtername; zend_str_size filternamelen; - long read_write = 0; + php_int_t read_write = 0; zval *filterparams = NULL; php_stream_filter *filter = NULL; int ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rS|lz", &zstream, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rS|iz", &zstream, &filtername, &filternamelen, &read_write, &filterparams) == FAILURE) { RETURN_FALSE; } @@ -1313,13 +1313,13 @@ PHP_FUNCTION(stream_get_line) { char *str = NULL; zend_str_size str_len = 0; - long max_length; + php_int_t max_length; zval *zstream; char *buf; size_t buf_size; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|S", &zstream, &max_length, &str, &str_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri|S", &zstream, &max_length, &str, &str_len) == FAILURE) { RETURN_FALSE; } @@ -1348,10 +1348,10 @@ PHP_FUNCTION(stream_set_blocking) { zval *arg1; int block; - long arg2; + php_int_t arg2; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &arg1, &arg2) == FAILURE) { return; } @@ -1374,12 +1374,12 @@ PHP_FUNCTION(stream_set_blocking) PHP_FUNCTION(stream_set_timeout) { zval *socket; - long seconds, microseconds = 0; + php_int_t seconds, microseconds = 0; struct timeval t; php_stream *stream; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "rl|l", &socket, &seconds, µseconds) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ri|i", &socket, &seconds, µseconds) == FAILURE) { return; } @@ -1409,11 +1409,11 @@ PHP_FUNCTION(stream_set_write_buffer) { zval *arg1; int ret; - long arg2; + php_int_t arg2; size_t buff; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &arg1, &arg2) == FAILURE) { RETURN_FALSE; } @@ -1437,11 +1437,11 @@ PHP_FUNCTION(stream_set_write_buffer) PHP_FUNCTION(stream_set_chunk_size) { int ret; - long csize; + php_int_t csize; zval *zstream; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zstream, &csize) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &zstream, &csize) == FAILURE) { RETURN_FALSE; } @@ -1472,11 +1472,11 @@ PHP_FUNCTION(stream_set_read_buffer) { zval *arg1; int ret; - long arg2; + php_int_t arg2; size_t buff; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &arg1, &arg2) == FAILURE) { RETURN_FALSE; } @@ -1499,13 +1499,13 @@ PHP_FUNCTION(stream_set_read_buffer) Enable or disable a specific kind of crypto on the stream */ PHP_FUNCTION(stream_socket_enable_crypto) { - long cryptokind = 0; + php_int_t cryptokind = 0; zval *zstream, *zsessstream = NULL; php_stream *stream, *sessstream = NULL; zend_bool enable; int ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb|lr", &zstream, &enable, &cryptokind, &zsessstream) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb|ir", &zstream, &enable, &cryptokind, &zsessstream) == FAILURE) { RETURN_FALSE; } @@ -1619,11 +1619,11 @@ PHP_FUNCTION(stream_supports_lock) disallowed. */ PHP_FUNCTION(stream_socket_shutdown) { - long how; + php_int_t how; zval *zstream; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zstream, &how) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri", &zstream, &how) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/string.c b/ext/standard/string.c index 9845645..6ec35dc 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -286,9 +286,9 @@ static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior) / { char *s11, *s22; zend_str_size len1, len2; - long start = 0, len = 0; + php_int_t start = 0, len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|ll", &s11, &len1, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|ii", &s11, &len1, &s22, &len2, &start, &len) == FAILURE) { return; } @@ -528,10 +528,10 @@ PHP_MINIT_FUNCTION(nl_langinfo) Query language and locale information */ PHP_FUNCTION(nl_langinfo) { - long item; + php_int_t item; char *value; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &item) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &item) == FAILURE) { return; } @@ -874,11 +874,11 @@ PHP_FUNCTION(wordwrap) char *newtext; zend_str_size textlen, breakcharlen = 1, newtextlen, chk; zend_str_size alloced; - long current = 0, laststart = 0, lastspace = 0; - long linelength = 75; + php_int_t current = 0, laststart = 0, lastspace = 0; + php_int_t linelength = 75; zend_bool docut = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lSb", &text, &textlen, &linelength, &breakchar, &breakcharlen, &docut) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iSb", &text, &textlen, &linelength, &breakchar, &breakcharlen, &docut) == FAILURE) { return; } @@ -1529,9 +1529,9 @@ PHP_FUNCTION(pathinfo) char *path, *ret = NULL; zend_str_size path_len, ret_len; int have_basename; - long opt = PHP_PATHINFO_ALL; + php_int_t opt = PHP_PATHINFO_ALL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &path, &path_len, &opt) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &path, &path_len, &opt) == FAILURE) { return; } @@ -1846,12 +1846,12 @@ PHP_FUNCTION(stripos) char *found = NULL; char *haystack; zend_str_size haystack_len; - long offset = 0; + php_int_t offset = 0; char *needle_dup = NULL, *haystack_dup; char needle_char[2]; zval *needle; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|l", &haystack, &haystack_len, &needle, &offset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|i", &haystack, &haystack_len, &needle, &offset) == FAILURE) { return; } @@ -1909,10 +1909,10 @@ PHP_FUNCTION(strrpos) zval *zneedle; char *needle, *haystack; zend_str_size needle_len, haystack_len; - long offset = 0; + php_int_t offset = 0; char *p, *e, ord_needle[2]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|l", &haystack, &haystack_len, &zneedle, &offset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|i", &haystack, &haystack_len, &zneedle, &offset) == FAILURE) { RETURN_FALSE; } @@ -1982,11 +1982,11 @@ PHP_FUNCTION(strripos) zval *zneedle; char *needle, *haystack; zend_str_size needle_len, haystack_len; - long offset = 0; + php_int_t offset = 0; char *p, *e, ord_needle[2]; char *needle_dup, *haystack_dup; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|l", &haystack, &haystack_len, &zneedle, &offset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|i", &haystack, &haystack_len, &zneedle, &offset) == FAILURE) { RETURN_FALSE; } @@ -2173,11 +2173,11 @@ PHP_FUNCTION(chunk_split) char *result; char *end = "\r\n"; zend_str_size endlen = 2; - long chunklen = 76; + php_int_t chunklen = 76; zend_str_size result_len; zend_str_size str_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lS", &str, &str_len, &chunklen, &end, &endlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iS", &str, &str_len, &chunklen, &end, &endlen) == FAILURE) { return; } @@ -4029,11 +4029,11 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines) char *str; char *heb_str, *tmp, *target, *broken_str; zend_str_size block_start, block_end, block_type, block_length, i; - long max_chars=0; + php_int_t max_chars=0; zend_str_size begin, end, char_count, orig_begin; zend_str_size str_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, &max_chars) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, &max_chars) == FAILURE) { return; } @@ -4906,14 +4906,14 @@ PHP_FUNCTION(count_chars) { char *input; int chars[256]; - long mymode=0; + php_int_t mymode=0; unsigned char *buf; zend_str_size len; int inx; char retstr[256]; zend_str_size retlen=0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &input, &len, &mymode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &input, &len, &mymode) == FAILURE) { return; } @@ -5136,13 +5136,13 @@ PHP_FUNCTION(strnatcasecmp) PHP_FUNCTION(substr_count) { char *haystack, *needle; - long offset = 0, length = 0; + php_int_t offset = 0, length = 0; int ac = ZEND_NUM_ARGS(); - int count = 0; + php_int_t count = 0; zend_str_size haystack_len, needle_len; char *p, *endp, cmp; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|ll", &haystack, &haystack_len, &needle, &needle_len, &offset, &length) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|ii", &haystack, &haystack_len, &needle, &needle_len, &offset, &length) == FAILURE) { return; } @@ -5382,9 +5382,9 @@ PHP_FUNCTION(str_word_count) { char *buf, *str, *char_list = NULL, *p, *e, *s, ch[256]; zend_str_size str_len, char_list_len = 0, word_count = 0; - long type = 0; + php_int_t type = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lS", &str, &str_len, &type, &char_list, &char_list_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|iS", &str, &str_len, &type, &char_list, &char_list_len) == FAILURE) { return; } @@ -5501,11 +5501,11 @@ PHP_FUNCTION(str_split) { char *str; zend_str_size str_len; - long split_length = 1; + php_int_t split_length = 1; char *p; zend_str_size n_reg_segments; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, &split_length) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, &split_length) == FAILURE) { return; } @@ -5572,11 +5572,11 @@ PHP_FUNCTION(substr_compare) { char *s1, *s2; zend_str_size s1_len, s2_len; - long offset, len=0; + php_int_t offset, len=0; zend_bool cs=0; zend_str_size cmp_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SSl|lb", &s1, &s1_len, &s2, &s2_len, &offset, &len, &cs) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SSi|ib", &s1, &s1_len, &s2, &s2_len, &offset, &len, &cs) == FAILURE) { RETURN_FALSE; } diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 9fc0848..6a57f4d 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -135,10 +135,10 @@ PHP_MSHUTDOWN_FUNCTION(syslog) PHP_FUNCTION(openlog) { char *ident; - long option, facility; + php_int_t option, facility; zend_str_size_int ident_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sll", &ident, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sii", &ident, &ident_len, &option, &facility) == FAILURE) { return; } @@ -175,11 +175,11 @@ PHP_FUNCTION(closelog) Generate a system log message */ PHP_FUNCTION(syslog) { - long priority; + php_int_t priority; char *message; zend_str_size_int message_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lS", &priority, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "iS", &priority, &message, &message_len) == FAILURE) { return; } diff --git a/ext/standard/type.c b/ext/standard/type.c index 12fcd64..23533eb 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -134,7 +134,7 @@ PHP_FUNCTION(settype) PHP_FUNCTION(intval) { zval **num; - long arg_base; + php_int_t arg_base; int base; switch (ZEND_NUM_ARGS()) { @@ -146,7 +146,7 @@ PHP_FUNCTION(intval) break; case 2: - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zl", &num, &arg_base) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zi", &num, &arg_base) == FAILURE) { return; } base = arg_base; diff --git a/ext/standard/url.c b/ext/standard/url.c index 16069ba..b8af28d 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -377,9 +377,9 @@ PHP_FUNCTION(parse_url) char *str; zend_str_size_int str_len; php_url *resource; - long key = -1; + php_int_t key = -1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &str, &str_len, &key) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &str, &str_len, &key) == FAILURE) { return; } @@ -705,9 +705,9 @@ PHP_FUNCTION(get_headers) zval **prev_val, **hdr = NULL, **h; HashPosition pos; HashTable *hashT; - long format = 0; + php_int_t format = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &url, &url_len, &format) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &url, &url_len, &format) == FAILURE) { return; } context = FG(default_context) ? FG(default_context) : (FG(default_context) = php_stream_context_alloc(TSRMLS_C)); diff --git a/main/SAPI.h b/main/SAPI.h index b595d27..ddcb98a 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -168,7 +168,7 @@ END_EXTERN_C() typedef struct { char *line; /* If you allocated this, you need to free it yourself */ zend_str_size_uint line_len; - long response_code; /* long due to zend_parse_parameters compatibility */ + php_int_t response_code; /* long due to zend_parse_parameters compatibility */ } sapi_header_line; typedef enum { /* Parameter: */