mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Wordsize fixes
This commit is contained in:
parent
b1d8f10450
commit
81f05c18f5
16 changed files with 31 additions and 26 deletions
|
@ -367,7 +367,7 @@ PHP_FUNCTION(bcpowmod)
|
||||||
char *left, *right, *modulous;
|
char *left, *right, *modulous;
|
||||||
int left_len, right_len, modulous_len;
|
int left_len, right_len, modulous_len;
|
||||||
bc_num first, second, mod, result;
|
bc_num first, second, mod, result;
|
||||||
int scale = BCG(bc_precision);
|
long scale = BCG(bc_precision);
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|l", &left, &left_len, &right, &right_len, &modulous, &modulous_len, &scale) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|l", &left, &left_len, &right, &right_len, &modulous, &modulous_len, &scale) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
|
|
@ -444,7 +444,7 @@ PHP_FUNCTION(ftp_alloc)
|
||||||
{
|
{
|
||||||
zval *z_ftp, *zresponse = NULL;
|
zval *z_ftp, *zresponse = NULL;
|
||||||
ftpbuf_t *ftp;
|
ftpbuf_t *ftp;
|
||||||
int size, ret;
|
long size, ret;
|
||||||
char *response = NULL;
|
char *response = NULL;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &z_ftp, &size, &zresponse) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &z_ftp, &size, &zresponse) == FAILURE) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ PHP_FUNCTION(mysqli_connect)
|
||||||
zval *object = getThis();
|
zval *object = getThis();
|
||||||
char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL;
|
char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL;
|
||||||
unsigned int hostname_len, username_len, passwd_len, dbname_len, socket_len;
|
unsigned int hostname_len, username_len, passwd_len, dbname_len, socket_len;
|
||||||
unsigned int port=0;
|
long port=0;
|
||||||
|
|
||||||
|
|
||||||
if (getThis() && !ZEND_NUM_ARGS()) {
|
if (getThis() && !ZEND_NUM_ARGS()) {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
sets report level */
|
sets report level */
|
||||||
PHP_FUNCTION(mysqli_report)
|
PHP_FUNCTION(mysqli_report)
|
||||||
{
|
{
|
||||||
int flags;
|
long flags;
|
||||||
|
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &flags) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &flags) == FAILURE) {
|
||||||
|
|
|
@ -5012,7 +5012,7 @@ PHP_FUNCTION(oci_lob_write_temporary)
|
||||||
oci_descriptor *descr;
|
oci_descriptor *descr;
|
||||||
ub4 offset = 1;
|
ub4 offset = 1;
|
||||||
ub4 loblen;
|
ub4 loblen;
|
||||||
int lob_type = OCI_TEMP_CLOB;
|
long lob_type = OCI_TEMP_CLOB;
|
||||||
|
|
||||||
oci_debug ("oci_write_temporary_lob");
|
oci_debug ("oci_write_temporary_lob");
|
||||||
|
|
||||||
|
|
|
@ -1401,7 +1401,7 @@ PHP_FUNCTION(pg_fetch_result)
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* {{{ void php_pgsql_fetch_hash */
|
/* {{{ void php_pgsql_fetch_hash */
|
||||||
static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, int into_object)
|
static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type, int into_object)
|
||||||
{
|
{
|
||||||
zval *result;
|
zval *result;
|
||||||
PGresult *pgsql_result;
|
PGresult *pgsql_result;
|
||||||
|
@ -3254,12 +3254,13 @@ PHP_FUNCTION(pg_result_status)
|
||||||
PHP_FUNCTION(pg_get_notify)
|
PHP_FUNCTION(pg_get_notify)
|
||||||
{
|
{
|
||||||
zval *pgsql_link;
|
zval *pgsql_link;
|
||||||
int id = -1, result_type = PGSQL_ASSOC;
|
int id = -1;
|
||||||
|
long result_type = PGSQL_ASSOC;
|
||||||
PGconn *pgsql;
|
PGconn *pgsql;
|
||||||
PGnotify *pgsql_notify;
|
PGnotify *pgsql_notify;
|
||||||
|
|
||||||
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "r|l",
|
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "r|l",
|
||||||
&pgsql_link) == FAILURE) {
|
&pgsql_link, &result_type) == FAILURE) {
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -967,7 +967,7 @@ PHP_FUNCTION(SoapServer,map)
|
||||||
PHP_METHOD(soapserver,setpersistence)
|
PHP_METHOD(soapserver,setpersistence)
|
||||||
{
|
{
|
||||||
soapServicePtr service;
|
soapServicePtr service;
|
||||||
int value;
|
long value;
|
||||||
|
|
||||||
SOAP_SERVER_BEGIN_CODE();
|
SOAP_SERVER_BEGIN_CODE();
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,7 @@ SPL_METHOD(RecursiveIteratorIterator, __construct)
|
||||||
spl_recursive_it_object *intern;
|
spl_recursive_it_object *intern;
|
||||||
zval *iterator;
|
zval *iterator;
|
||||||
zend_class_entry *ce_iterator;
|
zend_class_entry *ce_iterator;
|
||||||
int mode = RIT_LEAVES_ONLY;
|
long mode = RIT_LEAVES_ONLY;
|
||||||
|
|
||||||
php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);
|
php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ SPL_METHOD(RecursiveIteratorIterator, getDepth)
|
||||||
SPL_METHOD(RecursiveIteratorIterator, getSubIterator)
|
SPL_METHOD(RecursiveIteratorIterator, getSubIterator)
|
||||||
{
|
{
|
||||||
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||||
int level = object->level;
|
long level = object->level;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &level) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &level) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1202,7 +1202,7 @@ PHP_FUNCTION(sqlite_popen)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now we need to open the database */
|
/* now we need to open the database */
|
||||||
php_sqlite_open(fullpath, mode, hashkey, return_value, errmsg, NULL TSRMLS_CC);
|
php_sqlite_open(fullpath, (int)mode, hashkey, return_value, errmsg, NULL TSRMLS_CC);
|
||||||
|
|
||||||
efree(fullpath);
|
efree(fullpath);
|
||||||
efree(hashkey);
|
efree(hashkey);
|
||||||
|
@ -1254,7 +1254,7 @@ PHP_FUNCTION(sqlite_open)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
php_sqlite_open(fullpath ? fullpath : filename, mode, NULL, return_value, errmsg, object TSRMLS_CC);
|
php_sqlite_open(fullpath ? fullpath : filename, (int)mode, NULL, return_value, errmsg, object TSRMLS_CC);
|
||||||
|
|
||||||
if (fullpath) {
|
if (fullpath) {
|
||||||
efree(fullpath);
|
efree(fullpath);
|
||||||
|
@ -1294,7 +1294,7 @@ PHP_FUNCTION(sqlite_factory)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
php_sqlite_open(filename, mode, NULL, return_value, errmsg, return_value TSRMLS_CC);
|
php_sqlite_open(filename, (int)mode, NULL, return_value, errmsg, return_value TSRMLS_CC);
|
||||||
|
|
||||||
php_std_error_handling();
|
php_std_error_handling();
|
||||||
}
|
}
|
||||||
|
@ -1434,7 +1434,7 @@ next_row:
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* {{{ sqlite_query */
|
/* {{{ sqlite_query */
|
||||||
void sqlite_query(zval *object, struct php_sqlite_db *db, char *sql, long sql_len, long mode, int buffered, zval *return_value, struct php_sqlite_result **prres TSRMLS_DC)
|
void sqlite_query(zval *object, struct php_sqlite_db *db, char *sql, long sql_len, int mode, int buffered, zval *return_value, struct php_sqlite_result **prres TSRMLS_DC)
|
||||||
{
|
{
|
||||||
struct php_sqlite_result res, *rres;
|
struct php_sqlite_result res, *rres;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -1539,7 +1539,7 @@ PHP_FUNCTION(sqlite_unbuffered_query)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlite_query(object, db, sql, sql_len, mode, 0, return_value, NULL TSRMLS_CC);
|
sqlite_query(object, db, sql, sql_len, (int)mode, 0, return_value, NULL TSRMLS_CC);
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
@ -1646,7 +1646,7 @@ PHP_FUNCTION(sqlite_query)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlite_query(object, db, sql, sql_len, mode, 1, return_value, NULL TSRMLS_CC);
|
sqlite_query(object, db, sql, sql_len, (int)mode, 1, return_value, NULL TSRMLS_CC);
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
@ -2006,7 +2006,7 @@ PHP_FUNCTION(sqlite_array_query)
|
||||||
}
|
}
|
||||||
|
|
||||||
rres = (struct php_sqlite_result *)emalloc(sizeof(*rres));
|
rres = (struct php_sqlite_result *)emalloc(sizeof(*rres));
|
||||||
sqlite_query(NULL, db, sql, sql_len, mode, 0, NULL, &rres TSRMLS_CC);
|
sqlite_query(NULL, db, sql, sql_len, (int)mode, 0, NULL, &rres TSRMLS_CC);
|
||||||
if (db->last_err_code != SQLITE_OK) {
|
if (db->last_err_code != SQLITE_OK) {
|
||||||
if (rres) {
|
if (rres) {
|
||||||
efree(rres);
|
efree(rres);
|
||||||
|
|
|
@ -450,7 +450,7 @@ PHP_FUNCTION(scandir)
|
||||||
{
|
{
|
||||||
char *dirn;
|
char *dirn;
|
||||||
int dirn_len;
|
int dirn_len;
|
||||||
int flags = 0;
|
long flags = 0;
|
||||||
php_stream_dirent **namelist;
|
php_stream_dirent **namelist;
|
||||||
int n, i;
|
int n, i;
|
||||||
zval *zcontext = NULL;
|
zval *zcontext = NULL;
|
||||||
|
|
|
@ -502,7 +502,8 @@ PHP_FUNCTION(file_put_contents)
|
||||||
char *filename;
|
char *filename;
|
||||||
size_t filename_len;
|
size_t filename_len;
|
||||||
zval *data;
|
zval *data;
|
||||||
int numbytes = 0, flags = 0;
|
int numbytes = 0;
|
||||||
|
long flags = 0;
|
||||||
zval *zcontext = NULL;
|
zval *zcontext = NULL;
|
||||||
php_stream_context *context = NULL;
|
php_stream_context *context = NULL;
|
||||||
|
|
||||||
|
|
|
@ -657,7 +657,8 @@ PHP_FUNCTION(stream_select)
|
||||||
struct timeval *tv_p = NULL;
|
struct timeval *tv_p = NULL;
|
||||||
fd_set rfds, wfds, efds;
|
fd_set rfds, wfds, efds;
|
||||||
int max_fd = 0;
|
int max_fd = 0;
|
||||||
int retval, sets = 0, usec = 0;
|
int retval, sets = 0;
|
||||||
|
long usec = 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!|l", &r_array, &w_array, &e_array, &sec, &usec) == FAILURE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1649,7 +1649,8 @@ PHP_FUNCTION(strripos)
|
||||||
{
|
{
|
||||||
zval *zneedle;
|
zval *zneedle;
|
||||||
char *needle, *haystack;
|
char *needle, *haystack;
|
||||||
int needle_len, haystack_len, offset = 0;
|
int needle_len, haystack_len;
|
||||||
|
long offset = 0;
|
||||||
char *p, *e, ord_needle[2];
|
char *p, *e, ord_needle[2];
|
||||||
char *needle_dup, *haystack_dup;
|
char *needle_dup, *haystack_dup;
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,8 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
|
||||||
{
|
{
|
||||||
zval *date;
|
zval *date;
|
||||||
double latitude, longitude, zenith, gmt_offset, ret;
|
double latitude, longitude, zenith, gmt_offset, ret;
|
||||||
int time, N, retformat;
|
int time, N;
|
||||||
|
long retformat;
|
||||||
char retstr[6];
|
char retstr[6];
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|ldddd", &date, &retformat, &latitude, &longitude, &zenith, &gmt_offset) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|ldddd", &date, &retformat, &latitude, &longitude, &zenith, &gmt_offset) == FAILURE) {
|
||||||
|
|
|
@ -741,7 +741,7 @@ PHP_FUNCTION(unserialize)
|
||||||
if (!php_var_unserialize(&return_value, &p, p + Z_STRLEN_PP(buf), &var_hash TSRMLS_CC)) {
|
if (!php_var_unserialize(&return_value, &p, p + Z_STRLEN_PP(buf), &var_hash TSRMLS_CC)) {
|
||||||
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
|
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
|
||||||
zval_dtor(return_value);
|
zval_dtor(return_value);
|
||||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Error at offset %d of %d bytes", p - Z_STRVAL_PP(buf), Z_STRLEN_PP(buf));
|
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Error at offset %ld of %ld bytes", p - Z_STRVAL_PP(buf), Z_STRLEN_PP(buf));
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
|
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
|
||||||
|
|
|
@ -1506,7 +1506,7 @@ W32API_CLASS_FUNCTION(win32, unregisterfunction)
|
||||||
int function_name_len;
|
int function_name_len;
|
||||||
w32api_func_handle **fh = NULL;
|
w32api_func_handle **fh = NULL;
|
||||||
|
|
||||||
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l",
|
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
|
||||||
&function_name,
|
&function_name,
|
||||||
&function_name_len) == FAILURE)
|
&function_name_len) == FAILURE)
|
||||||
{
|
{
|
||||||
|
@ -1532,7 +1532,7 @@ W32API_CLASS_FUNCTION(win32, registercallback)
|
||||||
int function_definition_len;
|
int function_definition_len;
|
||||||
w32api_func_handle **fh = NULL;
|
w32api_func_handle **fh = NULL;
|
||||||
|
|
||||||
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l",
|
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
|
||||||
&function_definition,
|
&function_definition,
|
||||||
&function_definition_len) == FAILURE)
|
&function_definition_len) == FAILURE)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue