mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-26 18:35:42 +00:00
adapted all the zend_parse_parameters() calls
This commit is contained in:
1 parent
715b040f46
commit
a7a797b455
24 files changed
+86
-84
No files matched your search
@@ -141,7 +141,8 @@ PHP_MINFO_FUNCTION(assert) /* {{{ */
|
||||
PHP_FUNCTION(assert)
|
||||
{
|
||||
zval **assertion;
|
||||
int val, description_len = 0;
|
||||
int val;
|
||||
zend_str_size_int description_len = 0;
|
||||
char *myeval = NULL;
|
||||
char *compiled_string_description, *description = NULL;
|
||||
|
||||
@@ -149,7 +150,7 @@ PHP_FUNCTION(assert)
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|s", &assertion, &description, &description_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|S", &assertion, &description, &description_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -491,7 +491,7 @@ PHP_FUNCTION(get_browser)
|
||||
bdata = &global_bdata;
|
||||
}
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!b", &agent_name, &agent_name_len, &return_array) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|S!b", &agent_name, &agent_name_len, &return_array) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
PHP_NAMED_FUNCTION(php_if_crc32)
|
||||
{
|
||||
char *p;
|
||||
int len, nr;
|
||||
zend_str_size_int len, nr;
|
||||
php_uint32 crcinit = 0;
|
||||
register php_uint32 crc;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &p, &nr) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &p, &nr) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
crc = crcinit^0xFFFFFFFF;
|
||||
|
||||
@@ -259,14 +259,14 @@ PHP_FUNCTION(crypt)
|
||||
{
|
||||
char salt[PHP_MAX_SALT_LEN + 1];
|
||||
char *str, *salt_in = NULL, *result = NULL;
|
||||
int str_len, salt_in_len = 0;
|
||||
zend_str_size_int str_len, salt_in_len = 0;
|
||||
salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
|
||||
|
||||
/* This will produce suitable results if people depend on DES-encryption
|
||||
* available (passing always 2-character salt). At least for glibc6.1 */
|
||||
memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1);
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &str, &str_len, &salt_in, &salt_in_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|S", &str, &str_len, &salt_in, &salt_in_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ _cyr_mac = {
|
||||
* d - x-cp866
|
||||
* m - x-mac-cyrillic
|
||||
*****************************************************************************/
|
||||
static char * php_convert_cyr_string(unsigned char *str, int length, char from, char to TSRMLS_DC)
|
||||
static char * php_convert_cyr_string(unsigned char *str, zend_str_size_int length, char from, char to TSRMLS_DC)
|
||||
{
|
||||
const unsigned char *from_table, *to_table;
|
||||
unsigned char tmp;
|
||||
@@ -272,10 +272,10 @@ static char * php_convert_cyr_string(unsigned char *str, int length, char from,
|
||||
PHP_FUNCTION(convert_cyr_string)
|
||||
{
|
||||
char *input, *fr_cs, *to_cs;
|
||||
int input_len, fr_cs_len, to_cs_len;
|
||||
zend_str_size_int input_len, fr_cs_len, to_cs_len;
|
||||
unsigned char *str;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss", &input, &input_len, &fr_cs, &fr_cs_len, &to_cs, &to_cs_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SSS", &input, &input_len, &fr_cs, &fr_cs_len, &to_cs, &to_cs_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,13 +86,13 @@ char *strptime(const char *s, const char *format, struct tm *tm);
|
||||
PHP_FUNCTION(strptime)
|
||||
{
|
||||
char *ts;
|
||||
int ts_length;
|
||||
zend_str_size_int ts_length;
|
||||
char *format;
|
||||
int format_length;
|
||||
zend_str_size_int format_length;
|
||||
struct tm parsed_time;
|
||||
char *unparsed_part;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &ts, &ts_length, &format, &format_length) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS", &ts, &ts_length, &format, &format_length) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -54,9 +54,9 @@
|
||||
PHPAPI PHP_FUNCTION(dl)
|
||||
{
|
||||
char *filename;
|
||||
int filename_len;
|
||||
zend_str_size_int filename_len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &filename, &filename_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
PHP_FUNCTION(dns_get_mx) /* {{{ */
|
||||
{
|
||||
char *hostname;
|
||||
int hostname_len;
|
||||
zend_str_size_int hostname_len;
|
||||
zval *mx_list, *weight_list = NULL;
|
||||
|
||||
DNS_STATUS status; /* Return value of DnsQuery_A() function */
|
||||
PDNS_RECORD pResult, pRec; /* Pointer to DNS_RECORD structure */
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|z", &hostname, &hostname_len, &mx_list, &weight_list) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|z", &hostname, &hostname_len, &mx_list, &weight_list) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -93,13 +93,13 @@ PHP_FUNCTION(dns_get_mx) /* {{{ */
|
||||
PHP_FUNCTION(dns_check_record)
|
||||
{
|
||||
char *hostname, *rectype = NULL;
|
||||
int hostname_len, rectype_len = 0;
|
||||
zend_str_size_int hostname_len, rectype_len = 0;
|
||||
int type = DNS_TYPE_MX;
|
||||
|
||||
DNS_STATUS status; /* Return value of DnsQuery_A() function */
|
||||
PDNS_RECORD pResult; /* Pointer to DNS_RECORD structure */
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &hostname, &hostname_len, &rectype, &rectype_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|S", &hostname, &hostname_len, &rectype, &rectype_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -348,13 +348,13 @@ static void php_parserr(PDNS_RECORD pRec, int type_to_fetch, int store, int raw,
|
||||
PHP_FUNCTION(dns_get_record)
|
||||
{
|
||||
char *hostname;
|
||||
int hostname_len;
|
||||
zend_str_size_int hostname_len;
|
||||
long 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|lz!z!b",
|
||||
&hostname, &hostname_len, &type_param, &authns, &addtl, &raw) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
{
|
||||
char *host;
|
||||
int host_len;
|
||||
zend_str_size_int host_len;
|
||||
long port = -1;
|
||||
zval *zerrno = NULL, *zerrstr = NULL;
|
||||
double timeout = FG(default_socket_timeout);
|
||||
@@ -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|lzzd", &host, &host_len, &port, &zerrno, &zerrstr, &timeout) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -32,10 +32,10 @@
|
||||
PHP_FUNCTION(ftok)
|
||||
{
|
||||
char *pathname, *proj;
|
||||
int pathname_len, proj_len;
|
||||
zend_str_size_int pathname_len, proj_len;
|
||||
key_t k;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ps", &pathname, &pathname_len, &proj, &proj_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "PS", &pathname, &pathname_len, &proj, &proj_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -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|bl", &ctr.line,
|
||||
&ctr.line_len, &rep, &ctr.response_code) == FAILURE)
|
||||
return;
|
||||
|
||||
@@ -55,7 +55,7 @@ PHP_FUNCTION(header_remove)
|
||||
{
|
||||
sapi_header_line ctr = {0};
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &ctr.line,
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|S", &ctr.line,
|
||||
&ctr.line_len) == FAILURE)
|
||||
return;
|
||||
|
||||
@@ -180,9 +180,9 @@ PHP_FUNCTION(setcookie)
|
||||
char *name, *value = NULL, *path = NULL, *domain = NULL;
|
||||
long expires = 0;
|
||||
zend_bool secure = 0, httponly = 0;
|
||||
int name_len, value_len = 0, path_len = 0, domain_len = 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|SlSSbb", &name,
|
||||
&name_len, &value, &value_len, &expires, &path,
|
||||
&path_len, &domain, &domain_len, &secure, &httponly) == FAILURE) {
|
||||
return;
|
||||
@@ -203,9 +203,9 @@ PHP_FUNCTION(setrawcookie)
|
||||
char *name, *value = NULL, *path = NULL, *domain = NULL;
|
||||
long expires = 0;
|
||||
zend_bool secure = 0, httponly = 0;
|
||||
int name_len, value_len = 0, path_len = 0, domain_len = 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|SlSSbb", &name,
|
||||
&name_len, &value, &value_len, &expires, &path,
|
||||
&path_len, &domain, &domain_len, &secure, &httponly) == FAILURE) {
|
||||
return;
|
||||
|
||||
+2
-2
@@ -212,11 +212,11 @@ PHP_FUNCTION(http_build_query)
|
||||
{
|
||||
zval *formdata;
|
||||
char *prefix = NULL, *arg_sep=NULL;
|
||||
int arg_sep_len = 0, prefix_len = 0;
|
||||
zend_str_size_int arg_sep_len = 0, prefix_len = 0;
|
||||
smart_str formstr = {0};
|
||||
long 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|SSl", &formdata, &prefix, &prefix_len, &arg_sep, &arg_sep_len, &enc_type) != SUCCESS) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -1388,10 +1388,10 @@ static void php_getimagesize_from_any(INTERNAL_FUNCTION_PARAMETERS, int mode) {
|
||||
zval **info = NULL;
|
||||
php_stream *stream = NULL;
|
||||
char *input;
|
||||
int input_len;
|
||||
zend_str_size_int input_len;
|
||||
const int argc = ZEND_NUM_ARGS();
|
||||
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "s|Z", &input, &input_len, &info) == FAILURE) {
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "S|Z", &input, &input_len, &info) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -1159,9 +1159,9 @@ PHP_FUNCTION(phpinfo)
|
||||
PHP_FUNCTION(phpversion)
|
||||
{
|
||||
char *ext_name = NULL;
|
||||
int ext_name_len = 0;
|
||||
zend_str_size_int ext_name_len = 0;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &ext_name, &ext_name_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|S", &ext_name, &ext_name_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1215,9 +1215,9 @@ PHP_FUNCTION(php_sapi_name)
|
||||
PHP_FUNCTION(php_uname)
|
||||
{
|
||||
char *mode = "a";
|
||||
int modelen = sizeof("a")-1;
|
||||
zend_str_size_int modelen = sizeof("a")-1;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &mode, &modelen) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|S", &mode, &modelen) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
RETURN_STRING(php_get_uname(*mode), 0);
|
||||
|
||||
+5
-5
@@ -178,7 +178,7 @@ static char psheader[] = "\xFF\xED\0\0Photoshop 3.0\08BIM\x04\x04\0\0\0\0";
|
||||
PHP_FUNCTION(iptcembed)
|
||||
{
|
||||
char *iptcdata, *jpeg_file;
|
||||
int iptcdata_len, jpeg_file_len;
|
||||
zend_str_size_int iptcdata_len, jpeg_file_len;
|
||||
long spool = 0;
|
||||
FILE *fp;
|
||||
unsigned int marker, done = 0;
|
||||
@@ -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|l", &iptcdata, &iptcdata_len, &jpeg_file, &jpeg_file_len, &spool) != SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -296,14 +296,14 @@ PHP_FUNCTION(iptcembed)
|
||||
Parse binary IPTC-data into associative array */
|
||||
PHP_FUNCTION(iptcparse)
|
||||
{
|
||||
int inx = 0, len;
|
||||
zend_str_size_int inx = 0, len;
|
||||
unsigned int tagsfound = 0;
|
||||
unsigned char *buffer, recnum, dataset, key[ 16 ];
|
||||
char *str;
|
||||
int str_len;
|
||||
zend_str_size_int str_len;
|
||||
zval *values, **element;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) != SUCCESS) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &str, &str_len) != SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,27 +94,27 @@ PHP_FUNCTION(levenshtein)
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
char *str1, *str2;
|
||||
char *callback_name;
|
||||
int str1_len, str2_len, callback_len;
|
||||
zend_str_size_int str1_len, str2_len, callback_len;
|
||||
long cost_ins, cost_rep, cost_del;
|
||||
int distance = -1;
|
||||
|
||||
switch (argc) {
|
||||
case 2: /* just two strings: use maximum performance version */
|
||||
if (zend_parse_parameters(2 TSRMLS_CC, "ss", &str1, &str1_len, &str2, &str2_len) == FAILURE) {
|
||||
if (zend_parse_parameters(2 TSRMLS_CC, "SS", &str1, &str1_len, &str2, &str2_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
distance = reference_levdist(str1, str1_len, str2, str2_len, 1, 1, 1);
|
||||
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, "SSlll", &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);
|
||||
break;
|
||||
|
||||
case 3: /* most general version: calc cost by user-supplied function */
|
||||
if (zend_parse_parameters(3 TSRMLS_CC, "sss", &str1, &str1_len, &str2, &str2_len, &callback_name, &callback_len) == FAILURE) {
|
||||
if (zend_parse_parameters(3 TSRMLS_CC, "SSS", &str1, &str1_len, &str2, &str2_len, &callback_name, &callback_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
distance = custom_levdist(str1, str2, callback_name TSRMLS_CC);
|
||||
|
||||
@@ -63,10 +63,10 @@ TODO:
|
||||
PHP_FUNCTION(readlink)
|
||||
{
|
||||
char *link;
|
||||
int link_len;
|
||||
zend_str_size_int link_len;
|
||||
char target[MAXPATHLEN];
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &link, &link_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P", &link, &link_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -87,11 +87,11 @@ PHP_FUNCTION(readlink)
|
||||
PHP_FUNCTION(linkinfo)
|
||||
{
|
||||
char *link;
|
||||
int link_len;
|
||||
zend_str_size_int link_len;
|
||||
struct stat sb;
|
||||
int ret;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &link, &link_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P", &link, &link_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ PHP_FUNCTION(linkinfo)
|
||||
PHP_FUNCTION(symlink)
|
||||
{
|
||||
char *topath, *frompath;
|
||||
int topath_len, frompath_len;
|
||||
zend_str_size_int topath_len, frompath_len;
|
||||
BOOLEAN ret;
|
||||
char source_p[MAXPATHLEN];
|
||||
char dest_p[MAXPATHLEN];
|
||||
@@ -134,7 +134,7 @@ PHP_FUNCTION(symlink)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pp", &topath, &topath_len, &frompath, &frompath_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "PP", &topath, &topath_len, &frompath, &frompath_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -190,14 +190,14 @@ PHP_FUNCTION(symlink)
|
||||
PHP_FUNCTION(link)
|
||||
{
|
||||
char *topath, *frompath;
|
||||
int topath_len, frompath_len;
|
||||
zend_str_size_int topath_len, frompath_len;
|
||||
int ret;
|
||||
char source_p[MAXPATHLEN];
|
||||
char dest_p[MAXPATHLEN];
|
||||
|
||||
/*First argument to link function is the target and hence should go to frompath
|
||||
Second argument to link function is the link itself and hence should go to topath */
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &frompath, &frompath_len, &topath, &topath_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS", &frompath, &frompath_len, &topath, &topath_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -80,9 +80,9 @@ PHP_FUNCTION(ezmlm_hash)
|
||||
{
|
||||
char *str = NULL;
|
||||
unsigned int h = 5381;
|
||||
int j, str_len;
|
||||
zend_str_size_int j, str_len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &str, &str_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,13 +102,13 @@ PHP_FUNCTION(mail)
|
||||
{
|
||||
char *to=NULL, *message=NULL, *headers=NULL, *headers_trimmed=NULL;
|
||||
char *subject=NULL, *extra_cmd=NULL;
|
||||
int to_len, message_len, headers_len = 0;
|
||||
int subject_len, extra_cmd_len = 0, i;
|
||||
zend_str_size_int to_len, message_len, headers_len = 0;
|
||||
zend_str_size_int subject_len, extra_cmd_len = 0, i;
|
||||
char *force_extra_parameters = INI_STR("mail.force_extra_parameters");
|
||||
char *to_r, *subject_r;
|
||||
char *p, *e;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|ss", &to, &to_len, &subject, &subject_len, &message, &message_len, &headers, &headers_len, &extra_cmd, &extra_cmd_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SSS|SS", &to, &to_len, &subject, &subject_len, &message, &message_len, &headers, &headers_len, &extra_cmd, &extra_cmd_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ PHP_FUNCTION(metaphone)
|
||||
{
|
||||
char *str;
|
||||
char *result = 0;
|
||||
int str_len;
|
||||
zend_str_size_int str_len;
|
||||
long 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|l", &str, &str_len,
|
||||
&phones) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -175,11 +175,11 @@ static zend_bool php_password_make_salt(size_t length, char *ret TSRMLS_DC) /* {
|
||||
PHP_FUNCTION(password_get_info)
|
||||
{
|
||||
php_password_algo algo;
|
||||
int hash_len;
|
||||
zend_str_size_int hash_len;
|
||||
char *hash, *algo_name;
|
||||
zval *options;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hash, &hash_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &hash, &hash_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -218,12 +218,12 @@ PHP_FUNCTION(password_needs_rehash)
|
||||
{
|
||||
long new_algo = 0;
|
||||
php_password_algo algo;
|
||||
int hash_len;
|
||||
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, "Sl|H", &hash, &hash_len, &new_algo, &options) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -273,10 +273,10 @@ Verify a hash created using crypt() or password_hash() */
|
||||
PHP_FUNCTION(password_verify)
|
||||
{
|
||||
int status = 0, i;
|
||||
int password_len, hash_len;
|
||||
zend_str_size_int password_len, hash_len;
|
||||
char *ret, *password, *hash;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &password, &password_len, &hash, &hash_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS", &password, &password_len, &hash, &hash_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (php_crypt(password, password_len, hash, hash_len, &ret) == FAILURE) {
|
||||
@@ -309,12 +309,12 @@ PHP_FUNCTION(password_hash)
|
||||
{
|
||||
char *hash_format, *hash, *salt, *password, *result;
|
||||
long algo = 0;
|
||||
int password_len = 0, hash_len;
|
||||
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, "Sl|H", &password, &password_len, &algo, &options) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -203,9 +203,9 @@ PHPAPI unsigned char *php_quot_print_encode(const unsigned char *str, size_t len
|
||||
PHP_FUNCTION(quoted_printable_decode)
|
||||
{
|
||||
char *arg1, *str_in, *str_out;
|
||||
int arg1_len, i = 0, j = 0, k;
|
||||
zend_str_size_int arg1_len, i = 0, j = 0, k;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg1, &arg1_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &arg1, &arg1_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -263,10 +263,10 @@ PHP_FUNCTION(quoted_printable_decode)
|
||||
PHP_FUNCTION(quoted_printable_encode)
|
||||
{
|
||||
char *str, *new_str;
|
||||
int str_len;
|
||||
zend_str_size_int str_len;
|
||||
size_t new_str_len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) != SUCCESS) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &str, &str_len) != SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -35,13 +35,13 @@ PHPAPI void make_sha1_digest(char *sha1str, unsigned char *digest)
|
||||
PHP_FUNCTION(sha1)
|
||||
{
|
||||
char *arg;
|
||||
int arg_len;
|
||||
zend_str_size_int arg_len;
|
||||
zend_bool raw_output = 0;
|
||||
char sha1str[41];
|
||||
PHP_SHA1_CTX context;
|
||||
unsigned char digest[20];
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|b", &arg, &arg_len, &raw_output) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ PHP_FUNCTION(sha1)
|
||||
PHP_FUNCTION(sha1_file)
|
||||
{
|
||||
char *arg;
|
||||
int arg_len;
|
||||
zend_str_size_int arg_len;
|
||||
zend_bool raw_output = 0;
|
||||
char sha1str[41];
|
||||
unsigned char buf[1024];
|
||||
@@ -75,7 +75,7 @@ PHP_FUNCTION(sha1_file)
|
||||
int n;
|
||||
php_stream *stream;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|b", &arg, &arg_len, &raw_output) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|b", &arg, &arg_len, &raw_output) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
PHP_FUNCTION(soundex)
|
||||
{
|
||||
char *str;
|
||||
int i, _small, str_len, code, last;
|
||||
zend_str_size_int i, _small, str_len;
|
||||
int last, code;
|
||||
char soundex[4 + 1];
|
||||
|
||||
static char soundex_table[26] =
|
||||
|
||||
@@ -136,9 +136,9 @@ PHP_FUNCTION(openlog)
|
||||
{
|
||||
char *ident;
|
||||
long option, facility;
|
||||
int ident_len;
|
||||
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, "Sll", &ident,
|
||||
&ident_len, &option, &facility) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
@@ -177,9 +177,9 @@ PHP_FUNCTION(syslog)
|
||||
{
|
||||
long priority;
|
||||
char *message;
|
||||
int message_len;
|
||||
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, "lS", &priority,
|
||||
&message, &message_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user