summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-25 21:51:49 +0200
committerAnatol Belski <ab@php.net>2014-08-25 21:51:49 +0200
commitaf59e92b24c8f624672720d47ef65bd8457728b9 (patch)
tree1da992a4689783e1351760a8702cbf6844ad37aa
parentb9514bb8fd27e2d841bab3eb256fcbaa613aa049 (diff)
downloadphp-git-PRE_AST_MERGE.tar.gz
master renames phase 7PRE_AST_MERGE
-rw-r--r--Zend/zend_API.c2
-rw-r--r--Zend/zend_compile.c2
-rw-r--r--Zend/zend_exceptions.c4
-rw-r--r--Zend/zend_operators.c50
-rw-r--r--Zend/zend_operators.h10
-rw-r--r--Zend/zend_vm_def.h2
-rw-r--r--Zend/zend_vm_execute.h24
-rw-r--r--ext/bz2/bz2_filter.c4
-rw-r--r--ext/com_dotnet/com_com.c2
-rw-r--r--ext/com_dotnet/com_handlers.c4
-rw-r--r--ext/com_dotnet/com_saproxy.c10
-rw-r--r--ext/curl/interface.c24
-rw-r--r--ext/curl/multi.c4
-rw-r--r--ext/curl/share.c2
-rw-r--r--ext/date/php_date.c4
-rw-r--r--ext/dba/dba_db1.c2
-rw-r--r--ext/dba/dba_db2.c2
-rw-r--r--ext/dba/dba_db3.c2
-rw-r--r--ext/dba/dba_db4.c2
-rw-r--r--ext/dba/dba_dbm.c2
-rw-r--r--ext/dba/dba_gdbm.c2
-rw-r--r--ext/dba/dba_ndbm.c2
-rw-r--r--ext/ereg/ereg.c6
-rw-r--r--ext/fileinfo/libmagic/softmagic.c2
-rw-r--r--ext/filter/filter_private.h2
-rw-r--r--ext/gd/gd.c22
-rw-r--r--ext/hash/hash.c2
-rw-r--r--ext/iconv/iconv.c2
-rw-r--r--ext/imap/php_imap.c16
-rw-r--r--ext/interbase/ibase_blobs.c2
-rw-r--r--ext/interbase/ibase_events.c2
-rw-r--r--ext/interbase/ibase_query.c6
-rw-r--r--ext/interbase/interbase.c2
-rw-r--r--ext/intl/collator/collator_sort.c2
-rw-r--r--ext/intl/dateformat/dateformat_parse.c4
-rw-r--r--ext/intl/formatter/formatter_attr.c2
-rw-r--r--ext/intl/formatter/formatter_format.c2
-rw-r--r--ext/intl/formatter/formatter_parse.c4
-rw-r--r--ext/intl/msgformat/msgformat_helpers.cpp2
-rw-r--r--ext/intl/timezone/timezone_methods.cpp2
-rw-r--r--ext/ldap/ldap.c8
-rw-r--r--ext/mbstring/mbstring.c14
-rw-r--r--ext/mbstring/php_mbregex.c4
-rw-r--r--ext/mcrypt/mcrypt.c8
-rw-r--r--ext/mssql/php_mssql.c8
-rw-r--r--ext/mysql/php_mysql.c2
-rw-r--r--ext/mysqli/mysqli_api.c4
-rw-r--r--ext/mysqli/mysqli_warning.c2
-rw-r--r--ext/mysqlnd/mysqlnd_ps_codec.c6
-rw-r--r--ext/oci8/oci8_statement.c6
-rw-r--r--ext/odbc/birdstep.c2
-rw-r--r--ext/odbc/php_odbc.c2
-rw-r--r--ext/opcache/Optimizer/pass1_5.c2
-rw-r--r--ext/opcache/Optimizer/pass2.c6
-rw-r--r--ext/openssl/xp_ssl.c8
-rw-r--r--ext/pcntl/pcntl.c8
-rw-r--r--ext/pdo/pdo_dbh.c12
-rw-r--r--ext/pdo/pdo_sql_parser.c2
-rw-r--r--ext/pdo/pdo_sql_parser.re2
-rw-r--r--ext/pdo/pdo_stmt.c6
-rw-r--r--ext/pdo/php_pdo_driver.h2
-rw-r--r--ext/pdo_mysql/mysql_driver.c2
-rw-r--r--ext/pdo_oci/oci_driver.c2
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c6
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c4
-rw-r--r--ext/pdo_sqlite/sqlite_statement.c2
-rw-r--r--ext/pgsql/pgsql.c14
-rw-r--r--ext/posix/posix.c4
-rw-r--r--ext/readline/readline.c6
-rw-r--r--ext/simplexml/simplexml.c4
-rw-r--r--ext/snmp/snmp.c8
-rw-r--r--ext/soap/php_encoding.c2
-rw-r--r--ext/sockets/conversions.c2
-rw-r--r--ext/sockets/multicast.c4
-rw-r--r--ext/sockets/sockets.c12
-rw-r--r--ext/spl/spl_array.c2
-rw-r--r--ext/spl/spl_dllist.c12
-rw-r--r--ext/spl/spl_engine.c2
-rw-r--r--ext/spl/spl_engine.h2
-rw-r--r--ext/spl/spl_fixedarray.c10
-rw-r--r--ext/spl/spl_heap.c4
-rw-r--r--ext/sqlite3/sqlite3.c2
-rw-r--r--ext/standard/array.c4
-rw-r--r--ext/standard/filters.c4
-rw-r--r--ext/standard/math.c6
-rw-r--r--ext/standard/pack.c2
-rw-r--r--ext/standard/password.c4
-rw-r--r--ext/standard/scanf.c2
-rw-r--r--ext/standard/streamsfuncs.c2
-rw-r--r--ext/standard/string.c4
-rw-r--r--ext/standard/type.c6
-rw-r--r--ext/standard/user_filters.c2
-rw-r--r--ext/sybase_ct/php_sybase_ct.c2
-rw-r--r--ext/sysvmsg/sysvmsg.c8
-rw-r--r--ext/tidy/tidy.c4
-rw-r--r--ext/xml/xml.c8
-rw-r--r--ext/xmlrpc/xmlrpc-epi-php.c2
-rw-r--r--ext/xsl/xsltprocessor.c4
-rw-r--r--ext/zip/php_zip.c2
-rw-r--r--ext/zlib/zlib_filter.c8
-rw-r--r--main/php_ini.c2
-rw-r--r--main/streams/transports.c2
-rw-r--r--main/streams/userspace.c4
103 files changed, 273 insertions, 273 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 41b0149038..fef05e1e84 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -458,7 +458,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
case IS_FALSE:
case IS_TRUE:
case IS_LONG:
- convert_to_int_ex(arg);
+ convert_to_long_ex(arg);
*p = Z_LVAL_P(arg);
break;
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 7595e1adde..a37ca45265 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -6998,7 +6998,7 @@ void zend_do_declare_begin(TSRMLS_D) /* {{{ */
void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC) /* {{{ */
{
if (!zend_binary_strcasecmp(Z_STRVAL(var->u.constant), Z_STRLEN(var->u.constant), "ticks", sizeof("ticks")-1)) {
- convert_to_int(&val->u.constant);
+ convert_to_long(&val->u.constant);
CG(declarables).ticks = val->u.constant;
} else if (!zend_binary_strcasecmp(Z_STRVAL(var->u.constant), Z_STRLEN(var->u.constant), "encoding", sizeof("encoding")-1)) {
if (Z_TYPE(val->u.constant) == IS_CONSTANT) {
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index ff408d0bfd..bec30cd006 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -667,7 +667,7 @@ ZEND_METHOD(exception, __toString)
convert_to_string_ex(&message);
convert_to_string_ex(&file);
- convert_to_int_ex(&line);
+ convert_to_long_ex(&line);
fci.size = sizeof(fci);
fci.function_table = &Z_OBJCE_P(exception)->function_table;
@@ -910,7 +910,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity TSRMLS_DC) /* {
convert_to_string_ex(str);
convert_to_string_ex(file);
- convert_to_int_ex(line);
+ convert_to_long_ex(line);
zend_error_va(severity, (Z_STRLEN_P(file) > 0) ? Z_STRVAL_P(file) : NULL, Z_LVAL_P(line), "Uncaught %s\n thrown", Z_STRVAL_P(str));
} else {
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 8aa3808431..6330397303 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -219,7 +219,7 @@ try_again:
}
break;
case IS_OBJECT:
- convert_to_int_base(op, 10);
+ convert_to_long_base(op, 10);
break;
}
}
@@ -256,7 +256,7 @@ try_again:
break; \
case IS_OBJECT: \
ZVAL_DUP(&(holder), op); \
- convert_to_int_base(&(holder), 10); \
+ convert_to_long_base(&(holder), 10); \
if (Z_TYPE(holder) == IS_LONG) { \
(op) = &(holder); \
} \
@@ -266,10 +266,10 @@ try_again:
/* }}} */
-/* {{{ zendi_convert_to_int */
-#define zendi_convert_to_int(op, holder, result) \
+/* {{{ zendi_convert_to_long */
+#define zendi_convert_to_long(op, holder, result) \
if (op == result) { \
- convert_to_int(op); \
+ convert_to_long(op); \
} else if (Z_TYPE_P(op) != IS_LONG) { \
switch (Z_TYPE_P(op)) { \
case IS_NULL: \
@@ -290,7 +290,7 @@ try_again:
break; \
case IS_OBJECT: \
ZVAL_DUP(&(holder), (op)); \
- convert_to_int_base(&(holder), 10); \
+ convert_to_long_base(&(holder), 10); \
break; \
case IS_RESOURCE: \
ZVAL_LONG(&holder, Z_RES_HANDLE_P(op)); \
@@ -368,15 +368,15 @@ try_again:
/* }}} */
-ZEND_API void convert_to_int(zval *op) /* {{{ */
+ZEND_API void convert_to_long(zval *op) /* {{{ */
{
if (Z_TYPE_P(op) != IS_LONG) {
- convert_to_int_base(op, 10);
+ convert_to_long_base(op, 10);
}
}
/* }}} */
-ZEND_API void convert_to_int_base(zval *op, int base) /* {{{ */
+ZEND_API void convert_to_long_base(zval *op, int base) /* {{{ */
{
zend_long tmp;
@@ -419,7 +419,7 @@ ZEND_API void convert_to_int_base(zval *op, int base) /* {{{ */
zval dst;
TSRMLS_FETCH();
- convert_object_to_type(op, &dst, IS_LONG, convert_to_int);
+ convert_object_to_type(op, &dst, IS_LONG, convert_to_long);
zval_dtor(op);
if (Z_TYPE(dst) == IS_LONG) {
@@ -736,7 +736,7 @@ ZEND_API void convert_to_object(zval *op) /* {{{ */
}
/* }}} */
-ZEND_API void multi_convert_to_int_ex(int argc, ...) /* {{{ */
+ZEND_API void multi_convert_to_long_ex(int argc, ...) /* {{{ */
{
zval *arg;
va_list ap;
@@ -745,7 +745,7 @@ ZEND_API void multi_convert_to_int_ex(int argc, ...) /* {{{ */
while (argc--) {
arg = va_arg(ap, zval *);
- convert_to_int_ex(arg);
+ convert_to_long_ex(arg);
}
va_end(ap);
@@ -806,7 +806,7 @@ try_again:
case IS_OBJECT:
{
zval dst;
- convert_object_to_type(op, &dst, IS_LONG, convert_to_int);
+ convert_object_to_type(op, &dst, IS_LONG, convert_to_long);
if (Z_TYPE(dst) == IS_LONG) {
return Z_LVAL(dst);
} else {
@@ -1249,9 +1249,9 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ *
if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_MOD);
- zendi_convert_to_int(op1, op1_copy, result);
+ zendi_convert_to_long(op1, op1_copy, result);
op1_lval = Z_LVAL_P(op1);
- zendi_convert_to_int(op2, op2_copy, result);
+ zendi_convert_to_long(op2, op2_copy, result);
} else {
op1_lval = Z_LVAL_P(op1);
}
@@ -1376,9 +1376,9 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /
if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_BW_OR);
- zendi_convert_to_int(op1, op1_copy, result);
+ zendi_convert_to_long(op1, op1_copy, result);
op1_lval = Z_LVAL_P(op1);
- zendi_convert_to_int(op2, op2_copy, result);
+ zendi_convert_to_long(op2, op2_copy, result);
} else {
op1_lval = Z_LVAL_P(op1);
}
@@ -1421,9 +1421,9 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_BW_AND);
- zendi_convert_to_int(op1, op1_copy, result);
+ zendi_convert_to_long(op1, op1_copy, result);
op1_lval = Z_LVAL_P(op1);
- zendi_convert_to_int(op2, op2_copy, result);
+ zendi_convert_to_long(op2, op2_copy, result);
} else {
op1_lval = Z_LVAL_P(op1);
}
@@ -1466,9 +1466,9 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_BW_XOR);
- zendi_convert_to_int(op1, op1_copy, result);
+ zendi_convert_to_long(op1, op1_copy, result);
op1_lval = Z_LVAL_P(op1);
- zendi_convert_to_int(op2, op2_copy, result);
+ zendi_convert_to_long(op2, op2_copy, result);
} else {
op1_lval = Z_LVAL_P(op1);
}
@@ -1486,9 +1486,9 @@ ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /
if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_SL);
- zendi_convert_to_int(op1, op1_copy, result);
+ zendi_convert_to_long(op1, op1_copy, result);
op1_lval = Z_LVAL_P(op1);
- zendi_convert_to_int(op2, op2_copy, result);
+ zendi_convert_to_long(op2, op2_copy, result);
} else {
op1_lval = Z_LVAL_P(op1);
}
@@ -1506,9 +1506,9 @@ ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_SR);
- zendi_convert_to_int(op1, op1_copy, result);
+ zendi_convert_to_long(op1, op1_copy, result);
op1_lval = Z_LVAL_P(op1);
- zendi_convert_to_int(op2, op2_copy, result);
+ zendi_convert_to_long(op2, op2_copy, result);
} else {
op1_lval = Z_LVAL_P(op1);
}
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index def3db0cf2..a7f920bbac 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -333,14 +333,14 @@ ZEND_API int decrement_function(zval *op2);
ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC);
ZEND_API void _convert_to_cstring(zval *op ZEND_FILE_LINE_DC);
ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC);
-ZEND_API void convert_to_int(zval *op);
+ZEND_API void convert_to_long(zval *op);
ZEND_API void convert_to_double(zval *op);
-ZEND_API void convert_to_int_base(zval *op, int base);
+ZEND_API void convert_to_long_base(zval *op, int base);
ZEND_API void convert_to_null(zval *op);
ZEND_API void convert_to_boolean(zval *op);
ZEND_API void convert_to_array(zval *op);
ZEND_API void convert_to_object(zval *op);
-ZEND_API void multi_convert_to_int_ex(int argc, ...);
+ZEND_API void multi_convert_to_long_ex(int argc, ...);
ZEND_API void multi_convert_to_double_ex(int argc, ...);
ZEND_API void multi_convert_to_string_ex(int argc, ...);
@@ -418,7 +418,7 @@ END_EXTERN_C()
convert_to_null(pzv); \
break; \
case IS_LONG: \
- convert_to_int(pzv); \
+ convert_to_long(pzv); \
break; \
case IS_DOUBLE: \
convert_to_double(pzv); \
@@ -448,7 +448,7 @@ END_EXTERN_C()
}
#define convert_to_boolean_ex(pzv) convert_to_ex_master(pzv, boolean, _IS_BOOL)
-#define convert_to_int_ex(pzv) convert_to_ex_master(pzv, int, IS_LONG)
+#define convert_to_long_ex(pzv) convert_to_ex_master(pzv, int, IS_LONG)
#define convert_to_double_ex(pzv) convert_to_ex_master(pzv, double, IS_DOUBLE)
#define convert_to_string_ex(pzv) convert_to_ex_master(pzv, string, IS_STRING)
#define convert_to_array_ex(pzv) convert_to_ex_master(pzv, array, IS_ARRAY)
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 06a84b8835..8358ff5862 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -4956,7 +4956,7 @@ ZEND_VM_C_LABEL(num_index_prop):
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index c74609e331..08e6205978 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -16772,7 +16772,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -18759,7 +18759,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -21117,7 +21117,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -24348,7 +24348,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -25809,7 +25809,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -27089,7 +27089,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -28371,7 +28371,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -30162,7 +30162,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -33770,7 +33770,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -35668,7 +35668,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -37906,7 +37906,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
@@ -40881,7 +40881,7 @@ num_index_prop:
|| (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
&& IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
ZVAL_DUP(&tmp, offset);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
offset = &tmp;
}
}
diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c
index cb175af37c..b19b46eb57 100644
--- a/ext/bz2/bz2_filter.c
+++ b/ext/bz2/bz2_filter.c
@@ -380,7 +380,7 @@ static php_stream_filter *php_bz2_filter_create(const char *filtername, zval *fi
zval tmp;
ZVAL_DUP(&tmp, tmpzval);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
if (Z_LVAL(tmp) < 1 || Z_LVAL(tmp) > 9) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter given for number of blocks to allocate. (%pd)", Z_LVAL_P(tmpzval));
} else {
@@ -393,7 +393,7 @@ static php_stream_filter *php_bz2_filter_create(const char *filtername, zval *fi
zval tmp;
ZVAL_DUP(&tmp, tmpzval);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
if (Z_LVAL(tmp) < 0 || Z_LVAL(tmp) > 250) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter given for work factor. (%pd)", Z_LVAL(tmp));
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c
index 892d8c3829..002ee7a507 100644
--- a/ext/com_dotnet/com_com.c
+++ b/ext/com_dotnet/com_com.c
@@ -108,7 +108,7 @@ PHP_FUNCTION(com_create_instance)
if (NULL != (tmp = zend_hash_str_find(HASH_OF(server_params),
"Flags", sizeof("Flags")-1))) {
- convert_to_int_ex(tmp);
+ convert_to_long_ex(tmp);
ctx = (CLSCTX)Z_LVAL_P(tmp);
}
}
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c
index b9df407a1b..b67fb1e713 100644
--- a/ext/com_dotnet/com_handlers.c
+++ b/ext/com_dotnet/com_handlers.c
@@ -98,7 +98,7 @@ static zval *com_read_dimension(zval *object, zval *offset, int type, zval *rv T
VariantClear(&v);
}
} else if (V_ISARRAY(&obj->v)) {
- convert_to_int(offset);
+ convert_to_long(offset);
if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) {
if (php_com_safearray_get_elem(&obj->v, &v, Z_LVAL_P(offset) TSRMLS_CC)) {
@@ -144,7 +144,7 @@ static void com_write_dimension(zval *object, zval *offset, zval *value TSRMLS_D
vt = V_VT(&obj->v) & ~VT_ARRAY;
}
- convert_to_int(offset);
+ convert_to_long(offset);
indices = Z_LVAL_P(offset);
VariantInit(&v);
diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c
index 20aa33ed53..2eac10f5a8 100644
--- a/ext/com_dotnet/com_saproxy.c
+++ b/ext/com_dotnet/com_saproxy.c
@@ -134,7 +134,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type, zval *
/* the SafeArray case */
/* offset/index must be an integer */
- convert_to_int(offset);
+ convert_to_long(offset);
sa = V_ARRAY(&proxy->obj->v);
dims = SafeArrayGetDim(sa);
@@ -166,7 +166,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type, zval *
/* copy indices from proxy */
for (i = 0; i < dims; i++) {
- convert_to_int(&proxy->indices[i]);
+ convert_to_long(&proxy->indices[i]);
indices[i] = Z_LVAL(proxy->indices[i]);
}
@@ -240,12 +240,12 @@ static void saproxy_write_dimension(zval *object, zval *offset, zval *value TSRM
indices = safe_emalloc(dims, sizeof(LONG), 0);
/* copy indices from proxy */
for (i = 0; i < dims; i++) {
- convert_to_int(&proxy->indices[i]);
+ convert_to_long(&proxy->indices[i]);
indices[i] = Z_LVAL(proxy->indices[i]);
}
/* add user-supplied index */
- convert_to_int(offset);
+ convert_to_long(offset);
indices[dims-1] = Z_LVAL_P(offset);
if (FAILED(SafeArrayGetVartype(V_ARRAY(&proxy->obj->v), &vt)) || vt == VT_EMPTY) {
@@ -560,7 +560,7 @@ zend_object_iterator *php_com_saproxy_iter_get(zend_class_entry *ce, zval *objec
I->indices = safe_emalloc(proxy->dimensions + 1, sizeof(LONG), 0);
for (i = 0; i < proxy->dimensions; i++) {
- convert_to_int(&proxy->indices[i]);
+ convert_to_long(&proxy->indices[i]);
I->indices[i] = Z_LVAL(proxy->indices[i]);
}
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 0f3c166043..273d05f817 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -1319,7 +1319,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
length = -1;
} else if (!Z_ISUNDEF(retval)) {
if (Z_TYPE(retval) != IS_LONG) {
- convert_to_int_ex(&retval);
+ convert_to_long_ex(&retval);
}
length = Z_LVAL(retval);
}
@@ -1372,7 +1372,7 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_FNMATCH_FUNCTION");
} else if (!Z_ISUNDEF(retval)) {
if (Z_TYPE(retval) != IS_LONG) {
- convert_to_int_ex(&retval);
+ convert_to_long_ex(&retval);
}
rval = Z_LVAL(retval);
}
@@ -1432,7 +1432,7 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_PROGRESSFUNCTION");
} else if (!Z_ISUNDEF(retval)) {
if (Z_TYPE(retval) != IS_LONG) {
- convert_to_int_ex(&retval);
+ convert_to_long_ex(&retval);
}
if (0 != Z_LVAL(retval)) {
rval = 1;
@@ -1563,7 +1563,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
length = -1;
} else if (!Z_ISUNDEF(retval)) {
if (Z_TYPE(retval) != IS_LONG) {
- convert_to_int_ex(&retval);
+ convert_to_long_ex(&retval);
}
length = Z_LVAL(retval);
}
@@ -1993,7 +1993,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue TSRMLS_
switch (option) {
/* Long options */
case CURLOPT_SSL_VERIFYHOST:
- convert_to_int(zvalue);
+ convert_to_long(zvalue);
if (Z_LVAL_P(zvalue) == 1) {
#if LIBCURL_VERSION_NUM <= 0x071c00 /* 7.28.0 */
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST with value 1 is deprecated and will be removed as of libcurl 7.28.1. It is recommended to use value 2 instead");
@@ -2148,7 +2148,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue TSRMLS_
#if CURLOPT_MUTE != 0
case CURLOPT_MUTE:
#endif
- convert_to_int_ex(zvalue);
+ convert_to_long_ex(zvalue);
#if LIBCURL_VERSION_NUM >= 0x71304
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
(PG(open_basedir) && *PG(open_basedir)) && (Z_LVAL_P(zvalue) & CURLPROTO_FILE)) {
@@ -2159,7 +2159,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue TSRMLS_
error = curl_easy_setopt(ch->cp, option, Z_LVAL_P(zvalue));
break;
case CURLOPT_SAFE_UPLOAD:
- convert_to_int_ex(zvalue);
+ convert_to_long_ex(zvalue);
ch->safe_upload = (Z_LVAL_P(zvalue) != 0);
break;
@@ -2436,7 +2436,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue TSRMLS_
break;
case CURLOPT_FOLLOWLOCATION:
- convert_to_int_ex(zvalue);
+ convert_to_long_ex(zvalue);
#if LIBCURL_VERSION_NUM < 0x071304
if (PG(open_basedir) && *PG(open_basedir)) {
if (Z_LVAL_P(zvalue) != 0) {
@@ -2619,7 +2619,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue TSRMLS_
break;
case CURLOPT_RETURNTRANSFER:
- convert_to_int_ex(zvalue);
+ convert_to_long_ex(zvalue);
if (Z_LVAL_P(zvalue)) {
ch->handlers->write->method = PHP_CURL_RETURN;
} else {
@@ -2639,14 +2639,14 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue TSRMLS_
#if LIBCURL_VERSION_NUM >= 0x070f05 /* Available since 7.15.5 */
case CURLOPT_MAX_RECV_SPEED_LARGE:
case CURLOPT_MAX_SEND_SPEED_LARGE:
- convert_to_int_ex(zvalue);
+ convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch->cp, option, (curl_off_t)Z_LVAL_P(zvalue));
break;
#endif
#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */
case CURLOPT_POSTREDIR:
- convert_to_int_ex(zvalue);
+ convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch->cp, CURLOPT_POSTREDIR, Z_LVAL_P(zvalue) & CURL_REDIR_POST_ALL);
break;
#endif
@@ -2692,7 +2692,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue TSRMLS_
}
case CURLINFO_HEADER_OUT:
- convert_to_int_ex(zvalue);
+ convert_to_long_ex(zvalue);
if (Z_LVAL_P(zvalue) == 1) {
curl_easy_setopt(ch->cp, CURLOPT_DEBUGFUNCTION, curl_debug);
curl_easy_setopt(ch->cp, CURLOPT_DEBUGDATA, (void *)ch);
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 14f1e1ae84..72cfd29ca7 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -218,7 +218,7 @@ PHP_FUNCTION(curl_multi_exec)
}
}
- convert_to_int_ex(z_still_running);
+ convert_to_long_ex(z_still_running);
still_running = Z_LVAL_P(z_still_running);
result = curl_multi_perform(mh->multi, &still_running);
ZVAL_LONG(z_still_running, still_running);
@@ -386,7 +386,7 @@ static int _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue,
#if LIBCURL_VERSION_NUM >= 0x071003 /* 7.16.3 */
case CURLMOPT_MAXCONNECTS:
#endif
- convert_to_int_ex(zvalue);
+ convert_to_long_ex(zvalue);
error = curl_multi_setopt(mh->multi, option, Z_LVAL_P(zvalue));
break;
diff --git a/ext/curl/share.c b/ext/curl/share.c
index 254ab2d2d6..90c869df02 100644
--- a/ext/curl/share.c
+++ b/ext/curl/share.c
@@ -73,7 +73,7 @@ static int _php_curl_share_setopt(php_curlsh *sh, zend_long option, zval *zvalue
switch (option) {
case CURLSHOPT_SHARE:
case CURLSHOPT_UNSHARE:
- convert_to_int_ex(zvalue);
+ convert_to_long_ex(zvalue);
error = curl_share_setopt(sh->share, option, Z_LVAL_P(zvalue));
break;
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index e8c8aac06a..c187e9da53 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2760,7 +2760,7 @@ static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht
convert_to_string(z_date);
z_timezone_type = zend_hash_str_find(myht, "timezone_type", sizeof("timezone_type")-1);
if (z_timezone_type) {
- convert_to_int(z_timezone_type);
+ convert_to_long(z_timezone_type);
z_timezone = zend_hash_str_find(myht, "timezone", sizeof("timezone")-1);
if (z_timezone) {
convert_to_string(z_timezone);
@@ -3692,7 +3692,7 @@ static int php_date_timezone_initialize_from_hash(zval **return_value, php_timez
if ((z_timezone_type = zend_hash_str_find(myht, "timezone_type", sizeof("timezone_type")-1)) != NULL) {
if ((z_timezone = zend_hash_str_find(myht, "timezone", sizeof("timezone")-1)) != NULL) {
- convert_to_int(z_timezone_type);
+ convert_to_long(z_timezone_type);
if (SUCCESS == timezone_initialize(*tzobj, Z_STRVAL_P(z_timezone) TSRMLS_CC)) {
return SUCCESS;
}
diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c
index 66a6a57c60..8ee5d95f22 100644
--- a/ext/dba/dba_db1.c
+++ b/ext/dba/dba_db1.c
@@ -51,7 +51,7 @@ DBA_OPEN_FUNC(db1)
int filemode = 0644;
if (info->argc > 0) {
- convert_to_int_ex(&info->argv[0]);
+ convert_to_long_ex(&info->argv[0]);
filemode = Z_LVAL(info->argv[0]);
}
diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c
index 518e5c2093..60aa37f93a 100644
--- a/ext/dba/dba_db2.c
+++ b/ext/dba/dba_db2.c
@@ -72,7 +72,7 @@ DBA_OPEN_FUNC(db2)
}
if (info->argc > 0) {
- convert_to_int_ex(&info->argv[0]);
+ convert_to_long_ex(&info->argv[0]);
filemode = Z_LVAL(info->argv[0]);
}
diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c
index 599a15ad97..95a1e51fe0 100644
--- a/ext/dba/dba_db3.c
+++ b/ext/dba/dba_db3.c
@@ -81,7 +81,7 @@ DBA_OPEN_FUNC(db3)
}
if (info->argc > 0) {
- convert_to_int_ex(&info->argv[0]);
+ convert_to_long_ex(&info->argv[0]);
filemode = Z_LVAL(info->argv[0]);
}
diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c
index 4fab0b92ce..94a6c95e81 100644
--- a/ext/dba/dba_db4.c
+++ b/ext/dba/dba_db4.c
@@ -118,7 +118,7 @@ DBA_OPEN_FUNC(db4)
}
if (info->argc > 0) {
- convert_to_int_ex(&info->argv[0]);
+ convert_to_long_ex(&info->argv[0]);
filemode = Z_LVAL(info->argv[0]);
}
diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c
index 1d07998d62..f65a79bcc7 100644
--- a/ext/dba/dba_dbm.c
+++ b/ext/dba/dba_dbm.c
@@ -60,7 +60,7 @@ DBA_OPEN_FUNC(dbm)
int filemode = 0644;
if(info->argc > 0) {
- convert_to_int_ex(&info->argv[0]);
+ convert_to_long_ex(&info->argv[0]);
filemode = Z_LVAL(info->argv[0]);
}
diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c
index 362eddd879..d2c4a2f367 100644
--- a/ext/dba/dba_gdbm.c
+++ b/ext/dba/dba_gdbm.c
@@ -54,7 +54,7 @@ DBA_OPEN_FUNC(gdbm)
return FAILURE; /* not possible */
if(info->argc > 0) {
- convert_to_int_ex(&info->argv[0]);
+ convert_to_long_ex(&info->argv[0]);
filemode = Z_LVAL(info->argv[0]);
}
diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c
index d2524ada48..417446759c 100644
--- a/ext/dba/dba_ndbm.c
+++ b/ext/dba/dba_ndbm.c
@@ -59,7 +59,7 @@ DBA_OPEN_FUNC(ndbm)
}
if(info->argc > 0) {
- convert_to_int_ex(&info->argv[0]);
+ convert_to_long_ex(&info->argv[0]);
filemode = Z_LVAL(info->argv[0]);
}
diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c
index ca00b7a175..31416b2585 100644
--- a/ext/ereg/ereg.c
+++ b/ext/ereg/ereg.c
@@ -323,7 +323,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
} else {
/* we convert numbers to integers and treat them as a string */
if (Z_TYPE_P(regex) == IS_DOUBLE) {
- convert_to_int_ex(regex); /* get rid of decimal places */
+ convert_to_long_ex(regex); /* get rid of decimal places */
}
convert_to_string_ex(regex);
/* don't bother doing an extended regex with just a number */
@@ -570,7 +570,7 @@ static void php_do_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
pattern = STR_EMPTY_ALLOC();
}
} else {
- convert_to_int_ex(arg_pattern);
+ convert_to_long_ex(arg_pattern);
pattern = zend_string_alloc(1, 0);
pattern->val[0] = (char) Z_LVAL_P(arg_pattern);
pattern->val[1] = '\0';
@@ -583,7 +583,7 @@ static void php_do_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
replace = STR_EMPTY_ALLOC();
}
} else {
- convert_to_int_ex(arg_replace);
+ convert_to_long_ex(arg_replace);
replace = zend_string_alloc(1, 0);
replace->val[0] = (char) Z_LVAL_P(arg_replace);
replace->val[1] = '\0';
diff --git a/ext/fileinfo/libmagic/softmagic.c b/ext/fileinfo/libmagic/softmagic.c
index 0b323c0ec8..5fcc3a3c84 100644
--- a/ext/fileinfo/libmagic/softmagic.c
+++ b/ext/fileinfo/libmagic/softmagic.c
@@ -2156,7 +2156,7 @@ magiccheck(struct magic_set *ms, struct magic *m)
continue;
}
ZVAL_DUP(&offsetcopy, offset);
- convert_to_int(&offsetcopy);
+ convert_to_long(&offsetcopy);
pattern_offset = &offsetcopy;
} ZEND_HASH_FOREACH_END();
diff --git a/ext/filter/filter_private.h b/ext/filter/filter_private.h
index 45ab99a824..4eec7b9119 100644
--- a/ext/filter/filter_private.h
+++ b/ext/filter/filter_private.h
@@ -121,7 +121,7 @@
if (Z_TYPE_P(zv) != IS_LONG) { \
zval ___tmp; \
ZVAL_DUP(&___tmp, zv); \
- convert_to_int(&___tmp); \
+ convert_to_long(&___tmp); \
opt = Z_LVAL(___tmp); \
} else { \
opt = Z_LVAL_P(zv); \
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 53f07c06ec..0aeffc137b 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1541,7 +1541,7 @@ PHP_FUNCTION(imagesetstyle)
if (Z_TYPE_P(item) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, item);
- convert_to_int(&lval);
+ convert_to_long(&lval);
stylearr[index++] = Z_LVAL(lval);
} else {
stylearr[index++] = Z_LVAL_P(item);
@@ -3357,7 +3357,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled)
if (Z_TYPE_P(var) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, var);
- convert_to_int(&lval);
+ convert_to_long(&lval);
points[i].x = Z_LVAL(lval);
} else {
points[i].x = Z_LVAL_P(var);
@@ -3367,7 +3367,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled)
if (Z_TYPE_P(var) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, var);
- convert_to_int(&lval);
+ convert_to_long(&lval);
points[i].y = Z_LVAL(lval);
} else {
points[i].y = Z_LVAL_P(var);
@@ -4975,7 +4975,7 @@ PHP_FUNCTION(imagecrop)
if (Z_TYPE_P(tmp) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, tmp);
- convert_to_int(&lval);
+ convert_to_long(&lval);
rect.x = Z_LVAL(lval);
} else {
rect.x = Z_LVAL_P(tmp);
@@ -4989,7 +4989,7 @@ PHP_FUNCTION(imagecrop)
if (Z_TYPE_P(tmp) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, tmp);
- convert_to_int(&lval);
+ convert_to_long(&lval);
rect.y = Z_LVAL(lval);
} else {
rect.y = Z_LVAL_P(tmp);
@@ -5003,7 +5003,7 @@ PHP_FUNCTION(imagecrop)
if (Z_TYPE_P(tmp) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, tmp);
- convert_to_int(&lval);
+ convert_to_long(&lval);
rect.width = Z_LVAL(lval);
} else {
rect.width = Z_LVAL_P(tmp);
@@ -5017,7 +5017,7 @@ PHP_FUNCTION(imagecrop)
if (Z_TYPE_P(tmp) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, tmp);
- convert_to_int(&lval);
+ convert_to_long(&lval);
rect.height = Z_LVAL(lval);
} else {
rect.height = Z_LVAL_P(tmp);
@@ -5173,7 +5173,7 @@ PHP_FUNCTION(imageaffine)
if (Z_TYPE_P(tmp) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, tmp);
- convert_to_int(&lval);
+ convert_to_long(&lval);
rect.x = Z_LVAL(lval);
} else {
rect.x = Z_LVAL_P(tmp);
@@ -5187,7 +5187,7 @@ PHP_FUNCTION(imageaffine)
if (Z_TYPE_P(tmp) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, tmp);
- convert_to_int(&lval);
+ convert_to_long(&lval);
rect.y = Z_LVAL(lval);
} else {
rect.y = Z_LVAL_P(tmp);
@@ -5201,7 +5201,7 @@ PHP_FUNCTION(imageaffine)
if (Z_TYPE_P(tmp) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, tmp);
- convert_to_int(&lval);
+ convert_to_long(&lval);
rect.width = Z_LVAL(lval);
} else {
rect.width = Z_LVAL_P(tmp);
@@ -5215,7 +5215,7 @@ PHP_FUNCTION(imageaffine)
if (Z_TYPE_P(tmp) != IS_LONG) {
zval lval;
ZVAL_COPY(&lval, tmp);
- convert_to_int(&lval);
+ convert_to_long(&lval);
rect.height = Z_LVAL(lval);
} else {
rect.height = Z_LVAL_P(tmp);
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index ac03aa87ee..b78f979130 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -836,7 +836,7 @@ PHP_FUNCTION(mhash)
}
SEPARATE_ZVAL(z_algorithm);
- convert_to_int_ex(z_algorithm);
+ convert_to_long_ex(z_algorithm);
algorithm = Z_LVAL_P(z_algorithm);
/* need to convert the first parameter from int constant to string algorithm name */
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index d8d132578f..9a64c99cb9 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -2255,7 +2255,7 @@ PHP_FUNCTION(iconv_mime_encode)
if (Z_TYPE_P(pzval) != IS_LONG) {
ZVAL_DUP(&val, pzval);
- convert_to_int(&val);
+ convert_to_long(&val);
pzval = &val;
}
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 7e56de668a..3969a036fc 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -3553,11 +3553,11 @@ PHP_FUNCTION(imap_mail_compose)
topbod = bod;
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "type", sizeof("type") - 1)) != NULL) {
- convert_to_int_ex(pvalue);
+ convert_to_long_ex(pvalue);
bod->type = (short) Z_LVAL_P(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "encoding", sizeof("encoding") - 1)) != NULL) {
- convert_to_int_ex(pvalue);
+ convert_to_long_ex(pvalue);
bod->encoding = (short) Z_LVAL_P(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "charset", sizeof("charset") - 1)) != NULL) {
@@ -3626,11 +3626,11 @@ PHP_FUNCTION(imap_mail_compose)
bod->contents.text.size = 0;
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "lines", sizeof("lines") - 1)) != NULL) {
- convert_to_int_ex(pvalue);
+ convert_to_long_ex(pvalue);
bod->size.lines = Z_LVAL_P(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "bytes", sizeof("bytes") - 1)) != NULL) {
- convert_to_int_ex(pvalue);
+ convert_to_long_ex(pvalue);
bod->size.bytes = Z_LVAL_P(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "md5", sizeof("md5") - 1)) != NULL) {
@@ -3640,7 +3640,7 @@ PHP_FUNCTION(imap_mail_compose)
} else if (Z_TYPE_P(data) == IS_ARRAY) {
short type = -1;
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "type", sizeof("type") - 1)) != NULL) {
- convert_to_int_ex(pvalue);
+ convert_to_long_ex(pvalue);
type = (short) Z_LVAL_P(pvalue);
}
@@ -3660,7 +3660,7 @@ PHP_FUNCTION(imap_mail_compose)
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "encoding", sizeof("encoding") - 1)) != NULL) {
- convert_to_int_ex(pvalue);
+ convert_to_long_ex(pvalue);
bod->encoding = (short) Z_LVAL_P(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "charset", sizeof("charset") - 1)) != NULL) {
@@ -3730,11 +3730,11 @@ PHP_FUNCTION(imap_mail_compose)
bod->contents.text.size = 0;
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "lines", sizeof("lines") - 1)) != NULL) {
- convert_to_int_ex(pvalue);
+ convert_to_long_ex(pvalue);
bod->size.lines = Z_LVAL_P(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "bytes", sizeof("bytes") - 1)) != NULL) {
- convert_to_int_ex(pvalue);
+ convert_to_long_ex(pvalue);
bod->size.bytes = Z_LVAL_P(pvalue);
}
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "md5", sizeof("md5") - 1)) != NULL) {
diff --git a/ext/interbase/ibase_blobs.c b/ext/interbase/ibase_blobs.c
index ac7d69363b..8b8d731d7b 100644
--- a/ext/interbase/ibase_blobs.c
+++ b/ext/interbase/ibase_blobs.c
@@ -337,7 +337,7 @@ PHP_FUNCTION(ibase_blob_get)
RETURN_FALSE;
}
- convert_to_int_ex(len_arg);
+ convert_to_long_ex(len_arg);
if (_php_ibase_blob_get(return_value, ib_blob, Z_LVAL_P(len_arg) TSRMLS_CC) != SUCCESS) {
RETURN_FALSE;
diff --git a/ext/interbase/ibase_events.c b/ext/interbase/ibase_events.c
index 150512faf4..63a838679d 100644
--- a/ext/interbase/ibase_events.c
+++ b/ext/interbase/ibase_events.c
@@ -297,7 +297,7 @@ PHP_FUNCTION(ibase_set_event_handler)
RETURN_FALSE;
}
- convert_to_int_ex(&args[0]);
+ convert_to_long_ex(&args[0]);
link_res_id = Z_LVAL(args[0]);
} else {
diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c
index 66c66db6b4..1899e5aae1 100644
--- a/ext/interbase/ibase_query.c
+++ b/ext/interbase/ibase_query.c
@@ -534,7 +534,7 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
ISC_INT64 l;
case SQL_SHORT:
- convert_to_int(val);
+ convert_to_long(val);
if (Z_LVAL_P(val) > SHRT_MAX || Z_LVAL_P(val) < SHRT_MIN) {
_php_ibase_module_error("Array parameter exceeds field width" TSRMLS_CC);
return FAILURE;
@@ -542,7 +542,7 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
*(short *) buf = (short) Z_LVAL_P(val);
break;
case SQL_LONG:
- convert_to_int(val);
+ convert_to_long(val);
#if (SIZEOF_LONG > 4)
if (Z_LVAL_P(val) > ISC_LONG_MAX || Z_LVAL_P(val) < ISC_LONG_MIN) {
_php_ibase_module_error("Array parameter exceeds field width" TSRMLS_CC);
@@ -553,7 +553,7 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
break;
case SQL_INT64:
#if (SIZEOF_LONG >= 8)
- convert_to_int(val);
+ convert_to_long(val);
*(long *) buf = Z_LVAL_P(val);
#else
convert_to_string(val);
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index 4df47392fa..c6c108f377 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -1194,7 +1194,7 @@ PHP_FUNCTION(ibase_trans)
tpb_len = 0;
- convert_to_int_ex(&args[i]);
+ convert_to_long_ex(&args[i]);
trans_argl = Z_LVAL(args[i]);
if (trans_argl != PHP_IBASE_DEFAULT) {
diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c
index 0856b580be..dcf5d09e11 100644
--- a/ext/intl/collator/collator_sort.c
+++ b/ext/intl/collator/collator_sort.c
@@ -232,7 +232,7 @@ static int collator_compare_func( const void* a, const void* b TSRMLS_DC )
return 0;
}
- convert_to_int(&result);
+ convert_to_long(&result);
if( Z_LVAL(result) < 0 )
return -1;
diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c
index 79c2a2f7c0..628379e3b3 100644
--- a/ext/intl/dateformat/dateformat_parse.c
+++ b/ext/intl/dateformat/dateformat_parse.c
@@ -146,7 +146,7 @@ PHP_FUNCTION(datefmt_parse)
if (z_parse_pos) {
ZVAL_DEREF(z_parse_pos);
- convert_to_int(z_parse_pos);
+ convert_to_long(z_parse_pos);
parse_pos = (int32_t)Z_LVAL_P(z_parse_pos);
if(parse_pos > text_len) {
RETURN_FALSE;
@@ -185,7 +185,7 @@ PHP_FUNCTION(datefmt_localtime)
if (z_parse_pos) {
ZVAL_DEREF(z_parse_pos);
- convert_to_int(z_parse_pos);
+ convert_to_long(z_parse_pos);
parse_pos = (int32_t)Z_LVAL_P(z_parse_pos);
if(parse_pos > text_len) {
RETURN_FALSE;
diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c
index 4869fdf294..a4810b5e8c 100644
--- a/ext/intl/formatter/formatter_attr.c
+++ b/ext/intl/formatter/formatter_attr.c
@@ -182,7 +182,7 @@ PHP_FUNCTION( numfmt_set_attribute )
case UNUM_MIN_SIGNIFICANT_DIGITS:
case UNUM_MAX_SIGNIFICANT_DIGITS:
case UNUM_LENIENT_PARSE:
- convert_to_int_ex(value);
+ convert_to_long_ex(value);
unum_setAttribute(FORMATTER_OBJECT(nfo), attribute, Z_LVAL_P(value));
break;
case UNUM_ROUNDING_INCREMENT:
diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c
index abae435ca2..c8d221c7ee 100644
--- a/ext/intl/formatter/formatter_format.c
+++ b/ext/intl/formatter/formatter_format.c
@@ -74,7 +74,7 @@ PHP_FUNCTION( numfmt_format )
switch(type) {
case FORMAT_TYPE_INT32:
- convert_to_int_ex(number);
+ convert_to_long_ex(number);
formatted_len = unum_format(FORMATTER_OBJECT(nfo), (int32_t)Z_LVAL_P(number),
formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo));
if (INTL_DATA_ERROR_CODE(nfo) == U_BUFFER_OVERFLOW_ERROR) {
diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c
index fa06648331..4c17a645cc 100644
--- a/ext/intl/formatter/formatter_parse.c
+++ b/ext/intl/formatter/formatter_parse.c
@@ -68,7 +68,7 @@ PHP_FUNCTION( numfmt_parse )
if(zposition) {
ZVAL_DEREF(zposition);
- convert_to_int(zposition);
+ convert_to_long(zposition);
position = (int32_t)Z_LVAL_P( zposition );
position_p = &position;
}
@@ -157,7 +157,7 @@ PHP_FUNCTION( numfmt_parse_currency )
if(zposition) {
ZVAL_DEREF(zposition);
- convert_to_int(zposition);
+ convert_to_long(zposition);
position = (int32_t)Z_LVAL_P( zposition );
position_p = &position;
}
diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp
index 466db01731..c0c204cc69 100644
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -567,7 +567,7 @@ retry_kint64:
break;
case IS_TRUE:
case IS_FALSE:
- convert_to_int_ex(elem);
+ convert_to_long_ex(elem);
/* Intentional fallthrough */
case IS_LONG:
formattable.setInt64((int64_t)Z_LVAL_P(elem));
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index 9bbd182dee..adc9c351e0 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -171,7 +171,7 @@ int_offset:
}
} else if (Z_TYPE_P(arg) == IS_DOUBLE) {
double_offset:
- convert_to_int_ex(arg);
+ convert_to_long_ex(arg);
goto int_offset;
} else if (Z_TYPE_P(arg) == IS_OBJECT || Z_TYPE_P(arg) == IS_STRING) {
zend_long lval;
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index b029a83f63..92b7f3f8c4 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -2039,7 +2039,7 @@ PHP_FUNCTION(ldap_set_option)
{
int val;
- convert_to_int_ex(newval);
+ convert_to_long_ex(newval);
val = Z_LVAL_P(newval);
if (ldap_set_option(ldap, option, &val)) {
RETURN_FALSE;
@@ -2050,7 +2050,7 @@ PHP_FUNCTION(ldap_set_option)
{
struct timeval timeout;
- convert_to_int_ex(newval);
+ convert_to_long_ex(newval);
timeout.tv_sec = Z_LVAL_P(newval);
timeout.tv_usec = 0;
if (ldap_set_option(ldap, LDAP_OPT_NETWORK_TIMEOUT, (void *) &timeout)) {
@@ -2062,7 +2062,7 @@ PHP_FUNCTION(ldap_set_option)
{
int timeout;
- convert_to_int_ex(newval);
+ convert_to_long_ex(newval);
timeout = 1000 * Z_LVAL_P(newval); /* Convert to milliseconds */
if (ldap_set_option(ldap, LDAP_X_OPT_CONNECT_TIMEOUT, &timeout)) {
RETURN_FALSE;
@@ -2424,7 +2424,7 @@ int _ldap_rebind_proc(LDAP *ldap, const char *url, ber_tag_t req, ber_int_t msgi
ZVAL_COPY_VALUE(&cb_args[0], cb_link);
ZVAL_STRING(&cb_args[1], url);
if (call_user_function_ex(EG(function_table), NULL, &ld->rebindproc, &cb_retval, 2, cb_args, 0, NULL TSRMLS_CC) == SUCCESS && !Z_ISUNDEF(cb_retval)) {
- convert_to_int_ex(&cb_retval);
+ convert_to_long_ex(&cb_retval);
retval = Z_LVAL(cb_retval);
zval_ptr_dtor(&cb_retval);
} else {
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 4c78788127..3ad94d0c40 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -1993,7 +1993,7 @@ PHP_FUNCTION(mb_substitute_character)
} else if (strncasecmp("entity", Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)) == 0) {
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY;
} else {
- convert_to_int_ex(arg1);
+ convert_to_long_ex(arg1);
if (Z_LVAL_P(arg1) < 0xffff && Z_LVAL_P(arg1) > 0x0) {
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
@@ -2005,7 +2005,7 @@ PHP_FUNCTION(mb_substitute_character)
}
break;
default:
- convert_to_int_ex(arg1);
+ convert_to_long_ex(arg1);
if (Z_LVAL_P(arg1) < 0xffff && Z_LVAL_P(arg1) > 0x0) {
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
MBSTRG(current_filter_illegal_substchar) = Z_LVAL_P(arg1);
@@ -2356,14 +2356,14 @@ PHP_FUNCTION(mb_strrpos)
}
if (str_flg) {
- convert_to_int_ex(zoffset);
+ convert_to_long_ex(zoffset);
offset = Z_LVAL_P(zoffset);
} else {
enc_name = enc_name2;
enc_name_len = enc_name_len2;
}
} else {
- convert_to_int_ex(zoffset);
+ convert_to_long_ex(zoffset);
offset = Z_LVAL_P(zoffset);
}
}
@@ -2777,7 +2777,7 @@ PHP_FUNCTION(mb_substr)
if (argc < 3 || Z_TYPE_P(z_len) == IS_NULL) {
len = str_len;
} else {
- convert_to_int_ex(z_len);
+ convert_to_long_ex(z_len);
len = Z_LVAL_P(z_len);
}
@@ -2853,7 +2853,7 @@ PHP_FUNCTION(mb_strcut)
if (argc < 3 || Z_TYPE_P(z_len) == IS_NULL) {
len = string.len;
} else {
- convert_to_int_ex(z_len);
+ convert_to_long_ex(z_len);
len = Z_LVAL_P(z_len);
}
@@ -3814,7 +3814,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
mapelm = convmap;
mapsize = 0;
ZEND_HASH_FOREACH_VAL(target_hash, hash_entry) {
- convert_to_int_ex(hash_entry);
+ convert_to_long_ex(hash_entry);
*mapelm++ = Z_LVAL_P(hash_entry);
mapsize++;
} ZEND_HASH_FOREACH_END();
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 2237a318fe..35c741bb37 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -711,7 +711,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
if (Z_TYPE_P(arg_pattern) != IS_STRING) {
/* we convert numbers to integers and treat them as a string */
if (Z_TYPE_P(arg_pattern) == IS_DOUBLE) {
- convert_to_int_ex(arg_pattern); /* get rid of decimal places */
+ convert_to_long_ex(arg_pattern); /* get rid of decimal places */
}
convert_to_string_ex(arg_pattern);
/* don't bother doing an extended regex with just a number */
@@ -858,7 +858,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
arg_pattern_len = Z_STRLEN_P(arg_pattern_zval);
} else {
/* FIXME: this code is not multibyte aware! */
- convert_to_int_ex(arg_pattern_zval);
+ convert_to_long_ex(arg_pattern_zval);
pat_buf[0] = (char)Z_LVAL_P(arg_pattern_zval);
pat_buf[1] = '\0';
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index 01ee59f3d8..dba22948e5 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -1341,7 +1341,7 @@ PHP_FUNCTION(mcrypt_ecb)
MCRYPT_GET_CRYPT_ARGS
- convert_to_int_ex(mode);
+ convert_to_long_ex(mode);
php_mcrypt_do_crypt(cipher, key, key_len, data, data_len, "ecb", iv, iv_len, Z_LVAL_P(mode), return_value TSRMLS_CC);
}
@@ -1357,7 +1357,7 @@ PHP_FUNCTION(mcrypt_cbc)
MCRYPT_GET_CRYPT_ARGS
- convert_to_int_ex(mode);
+ convert_to_long_ex(mode);
php_mcrypt_do_crypt(cipher, key, key_len, data, data_len, "cbc", iv, iv_len, Z_LVAL_P(mode), return_value TSRMLS_CC);
}
@@ -1373,7 +1373,7 @@ PHP_FUNCTION(mcrypt_cfb)
MCRYPT_GET_CRYPT_ARGS
- convert_to_int_ex(mode);
+ convert_to_long_ex(mode);
php_mcrypt_do_crypt(cipher, key, key_len, data, data_len, "cfb", iv, iv_len, Z_LVAL_P(mode), return_value TSRMLS_CC);
}
@@ -1389,7 +1389,7 @@ PHP_FUNCTION(mcrypt_ofb)
MCRYPT_GET_CRYPT_ARGS
- convert_to_int_ex(mode);
+ convert_to_long_ex(mode);
php_mcrypt_do_crypt(cipher, key, key_len, data, data_len, "ofb", iv, iv_len, Z_LVAL_P(mode), return_value TSRMLS_CC);
}
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c
index 088166913e..4bb7454c43 100644
--- a/ext/mssql/php_mssql.c
+++ b/ext/mssql/php_mssql.c
@@ -1160,7 +1160,7 @@ static void _mssql_get_sp_result(mssql_link *mssql_ptr, mssql_statement *stateme
case SQLINT1:
case SQLINT2:
case SQLINT4:
- convert_to_int_ex(&bind->zval);
+ convert_to_long_ex(&bind->zval);
/* FIXME this works only on little endian machine !!! */
Z_LVAL_P(bind->zval) = *((int *)(dbretdata(mssql_ptr->link,i)));
break;
@@ -1195,7 +1195,7 @@ static void _mssql_get_sp_result(mssql_link *mssql_ptr, mssql_statement *stateme
if (statement->binds != NULL) { /* Maybe a non-parameter sp */
if (zend_hash_find(statement->binds, "RETVAL", 6, (void**)&bind)==SUCCESS) {
if (dbhasretstat(mssql_ptr->link)) {
- convert_to_int_ex(&bind->zval);
+ convert_to_long_ex(&bind->zval);
Z_LVAL_P(bind->zval)=dbretstatus(mssql_ptr->link);
}
else {
@@ -1877,7 +1877,7 @@ PHP_FUNCTION(mssql_result)
break;
}
default:
- convert_to_int_ex(field);
+ convert_to_long_ex(field);
field_offset = Z_LVAL_PP(field);
if (field_offset<0 || field_offset>=result->num_fields) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad column offset specified");
@@ -2067,7 +2067,7 @@ PHP_FUNCTION(mssql_bind)
case SQLINT1:
case SQLINT2:
case SQLINT4:
- convert_to_int_ex(var);
+ convert_to_long_ex(var);
value=(LPBYTE)(&Z_LVAL_PP(var));
break;
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 2bc488fe23..dc5a2120ba 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1992,7 +1992,7 @@ Q: String or long first?
}
break;
default:
- convert_to_int_ex(field);
+ convert_to_long_ex(field);
field_offset = Z_LVAL_P(field);
if (field_offset < 0 || field_offset >= (int)mysql_num_fields(mysql_result)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad column offset specified");
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index f6286af4c4..0b6d866437 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -919,7 +919,7 @@ PHP_FUNCTION(mysqli_stmt_execute)
break;
case MYSQL_TYPE_LONGLONG:
case MYSQL_TYPE_LONG:
- convert_to_int_ex(param);
+ convert_to_long_ex(param);
stmt->stmt->params[i].buffer = &Z_LVAL_P(param);
break;
default:
@@ -1787,7 +1787,7 @@ PHP_FUNCTION(mysqli_options)
convert_to_string_ex(mysql_value);
break;
case IS_LONG:
- convert_to_int_ex(mysql_value);
+ convert_to_long_ex(mysql_value);
break;
default:
break;
diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c
index 0f39ba2edc..a72c97b596 100644
--- a/ext/mysqli/mysqli_warning.c
+++ b/ext/mysqli/mysqli_warning.c
@@ -146,7 +146,7 @@ MYSQLI_WARNING * php_get_warnings(MYSQLND_CONN_DATA * mysql TSRMLS_DC)
/* 1. Here comes the error no */
entry = zend_hash_get_current_data(Z_ARRVAL(row));
- convert_to_int_ex(entry);
+ convert_to_long_ex(entry);
errno = Z_LVAL_P(entry);
zend_hash_move_forward(Z_ARRVAL(row));
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c
index 2e414cacef..7cb462960b 100644
--- a/ext/mysqlnd/mysqlnd_ps_codec.c
+++ b/ext/mysqlnd/mysqlnd_ps_codec.c
@@ -640,7 +640,7 @@ mysqlnd_stmt_execute_prepare_param_types(MYSQLND_STMT_DATA * stmt, zval ** copie
stmt->send_types_to_server = *resend_types_next_time = 1;
convert_to_string_ex(tmp_data);
} else {
- convert_to_int_ex(tmp_data);
+ convert_to_long_ex(tmp_data);
}
zval_ptr_dtor(&tmp_data_copy);
@@ -684,7 +684,7 @@ mysqlnd_stmt_execute_store_types(MYSQLND_STMT_DATA * stmt, zval * copies, zend_u
current_type = MYSQL_TYPE_VAR_STRING;
/*
don't change stmt->param_bind[i].type to MYSQL_TYPE_VAR_STRING
- we force convert_to_int_ex in all cases, thus the type will be right in the next switch.
+ we force convert_to_long_ex in all cases, thus the type will be right in the next switch.
if the type is however not long, then we will do a goto in the next switch.
We want to preserve the original bind type given by the user. Thus, we do these hacks.
*/
@@ -751,7 +751,7 @@ mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval
if (Z_TYPE_P(tmp_data) == IS_STRING) {
goto use_string;
}
- convert_to_int_ex(tmp_data);
+ convert_to_long_ex(tmp_data);
}
*data_size += 4 + is_longlong;
break;
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c
index 415961d4ca..f9d2a3a0ff 100644
--- a/ext/oci8/oci8_statement.c
+++ b/ext/oci8/oci8_statement.c
@@ -1143,7 +1143,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid variable used for bind");
return 1;
}
- convert_to_int(var);
+ convert_to_long(var);
bind_data = (ub4 *)&Z_LVAL_P(var);
value_sz = sizeof(ub4);
mode = OCI_DEFAULT;
@@ -1463,7 +1463,7 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
/* NB: for PHP4 compat only, it should be using 'Z' instead */
tmp = *column_index;
zval_copy_ctor(&tmp);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
column = php_oci_statement_get_column(statement, Z_LVAL(tmp), NULL, 0 TSRMLS_CC);
if (!column) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid column index \"%ld\"", Z_LVAL(tmp));
@@ -1720,7 +1720,7 @@ php_oci_bind *php_oci_bind_array_helper_number(zval *var, long max_table_length
bind->array.element_lengths[i] = sizeof(ub4);
}
if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) {
- convert_to_int_ex(entry);
+ convert_to_long_ex(entry);
((ub4 *)bind->array.elements)[i] = (ub4) Z_LVAL_PP(entry);
zend_hash_move_forward(hash);
} else {
diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c
index 9148c71da9..d9c0f36320 100644
--- a/ext/odbc/birdstep.c
+++ b/ext/odbc/birdstep.c
@@ -478,7 +478,7 @@ PHP_FUNCTION(birdstep_result)
if ( Z_TYPE_PP(col) == IS_STRING ) {
field = Z_STRVAL_PP(col);
} else {
- convert_to_int_ex(col);
+ convert_to_long_ex(col);
indx = Z_LVAL_PP(col);
}
if ( field ) {
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 0b873a0b33..415588ff0b 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -2035,7 +2035,7 @@ PHP_FUNCTION(odbc_result)
if (Z_TYPE_P(pv_field) == IS_STRING) {
field = Z_STRVAL_P(pv_field);
} else {
- convert_to_int_ex(pv_field);
+ convert_to_long_ex(pv_field);
field_ind = Z_LVAL_P(pv_field) - 1;
}
diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c
index cc8a37e529..de09e89123 100644
--- a/ext/opcache/Optimizer/pass1_5.c
+++ b/ext/opcache/Optimizer/pass1_5.c
@@ -104,7 +104,7 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
convert_to_boolean(&res);
break;
case IS_LONG:
- convert_to_int(&res);
+ convert_to_long(&res);
break;
case IS_DOUBLE:
convert_to_double(&res);
diff --git a/ext/opcache/Optimizer/pass2.c b/ext/opcache/Optimizer/pass2.c
index 374c6d2426..083a7b961b 100644
--- a/ext/opcache/Optimizer/pass2.c
+++ b/ext/opcache/Optimizer/pass2.c
@@ -62,7 +62,7 @@ if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
case ZEND_SR:
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
if (Z_TYPE(ZEND_OP1_LITERAL(opline)) != IS_LONG) {
- convert_to_int(&ZEND_OP1_LITERAL(opline));
+ convert_to_long(&ZEND_OP1_LITERAL(opline));
}
}
/* break missing *intentionally - the assign_op's may only optimize op2 */
@@ -75,7 +75,7 @@ if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
}
if (ZEND_OP2_TYPE(opline) == IS_CONST) {
if (Z_TYPE(ZEND_OP2_LITERAL(opline)) != IS_LONG) {
- convert_to_int(&ZEND_OP2_LITERAL(opline));
+ convert_to_long(&ZEND_OP2_LITERAL(opline));
}
}
break;
@@ -183,7 +183,7 @@ if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
if (ZEND_OP2_TYPE(opline) != IS_CONST) {
break;
}
- convert_to_int(&ZEND_OP2_LITERAL(opline));
+ convert_to_long(&ZEND_OP2_LITERAL(opline));
nest_levels = ZEND_OP2_LITERAL(opline).value.lval;
array_offset = ZEND_OP1(opline).opline_num;
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index b0f6d4deca..104e50b0ce 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -69,7 +69,7 @@
/* Simplify ssl context option retrieval */
#define GET_VER_OPT(name) (PHP_STREAM_CONTEXT(stream) && (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", name)) != NULL)
#define GET_VER_OPT_STRING(name, str) if (GET_VER_OPT(name)) { convert_to_string_ex(val); str = Z_STRVAL_P(val); }
-#define GET_VER_OPT_LONG(name, num) if (GET_VER_OPT(name)) { convert_to_int_ex(val); num = Z_LVAL_P(val); }
+#define GET_VER_OPT_LONG(name, num) if (GET_VER_OPT(name)) { convert_to_long_ex(val); num = Z_LVAL_P(val); }
/* Used for peer verification in windows */
#define PHP_X509_NAME_ENTRY_TO_UTF8(ne, i, out) ASN1_STRING_to_UTF8(&out, X509_NAME_ENTRY_get_data(X509_NAME_get_entry(ne, i)))
@@ -1038,7 +1038,7 @@ static void init_server_reneg_limit(php_stream *stream, php_openssl_netstream_da
NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream),
"ssl", "reneg_limit"))
) {
- convert_to_int(val);
+ convert_to_long(val);
limit = Z_LVAL_P(val);
}
@@ -1051,7 +1051,7 @@ static void init_server_reneg_limit(php_stream *stream, php_openssl_netstream_da
NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream),
"ssl", "reneg_window"))
) {
- convert_to_int(val);
+ convert_to_long(val);
window = Z_LVAL_P(val);
}
@@ -2178,7 +2178,7 @@ static zend_long get_crypto_method(php_stream_context *ctx, zend_long crypto_met
zval *val;
if (ctx && (val = php_stream_context_get_option(ctx, "ssl", "crypto_method")) != NULL) {
- convert_to_int_ex(val);
+ convert_to_long_ex(val);
crypto_method = (zend_long)Z_LVAL_P(val);
crypto_method |= STREAM_CRYPTO_IS_CLIENT;
}
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 7ead941de0..206f0feaa4 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -577,7 +577,7 @@ PHP_FUNCTION(pcntl_waitpid)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz/|l", &pid, &z_status, &options) == FAILURE)
return;
- convert_to_int_ex(z_status);
+ convert_to_long_ex(z_status);
status = Z_LVAL_P(z_status);
@@ -605,7 +605,7 @@ PHP_FUNCTION(pcntl_wait)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/|l", &z_status, &options) == FAILURE)
return;
- convert_to_int_ex(z_status);
+ convert_to_long_ex(z_status);
status = Z_LVAL_P(z_status);
#ifdef HAVE_WAIT3
@@ -929,7 +929,7 @@ PHP_FUNCTION(pcntl_sigprocmask)
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(user_set), user_signo) {
if (Z_TYPE_P(user_signo) != IS_LONG) {
SEPARATE_ZVAL(user_signo);
- convert_to_int_ex(user_signo);
+ convert_to_long_ex(user_signo);
}
signo = Z_LVAL_P(user_signo);
if (sigaddset(&set, signo) != 0) {
@@ -994,7 +994,7 @@ static void pcntl_sigwaitinfo(INTERNAL_FUNCTION_PARAMETERS, int timedwait) /* {{
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(user_set), user_signo) {
if (Z_TYPE_P(user_signo) != IS_LONG) {
SEPARATE_ZVAL(user_signo);
- convert_to_int_ex(user_signo);
+ convert_to_long_ex(user_signo);
}
signo = Z_LVAL_P(user_signo);
if (sigaddset(&set, signo) != 0) {
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 06d8c71235..20ffa560ac 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -285,7 +285,7 @@ static PHP_METHOD(PDO, dbh_constructor)
Z_STRVAL_P(v));
is_persistent = 1;
} else {
- convert_to_int_ex(v);
+ convert_to_long_ex(v);
is_persistent = Z_LVAL_P(v) ? 1 : 0;
plen = spprintf(&hashkey, 0, "PDO:DBH:DSN=%s:%s:%s", data_source,
username ? username : "",
@@ -688,7 +688,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value TSR
switch (attr) {
case PDO_ATTR_ERRMODE:
PDO_LONG_PARAM_CHECK;
- convert_to_int(value);
+ convert_to_long(value);
switch (Z_LVAL_P(value)) {
case PDO_ERRMODE_SILENT:
case PDO_ERRMODE_WARNING:
@@ -704,7 +704,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value TSR
case PDO_ATTR_CASE:
PDO_LONG_PARAM_CHECK;
- convert_to_int(value);
+ convert_to_long(value);
switch (Z_LVAL_P(value)) {
case PDO_CASE_NATURAL:
case PDO_CASE_UPPER:
@@ -720,7 +720,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value TSR
case PDO_ATTR_ORACLE_NULLS:
PDO_LONG_PARAM_CHECK;
- convert_to_int(value);
+ convert_to_long(value);
dbh->oracle_nulls = Z_LVAL_P(value);
return SUCCESS;
@@ -736,7 +736,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value TSR
} else {
PDO_LONG_PARAM_CHECK;
}
- convert_to_int(value);
+ convert_to_long(value);
if (Z_LVAL_P(value) == PDO_FETCH_USE_DEFAULT) {
pdo_raise_impl_error(dbh, NULL, "HY000", "invalid fetch mode type" TSRMLS_CC);
return FAILURE;
@@ -746,7 +746,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value TSR
case PDO_ATTR_STRINGIFY_FETCHES:
PDO_LONG_PARAM_CHECK;
- convert_to_int(value);
+ convert_to_long(value);
dbh->stringify = Z_LVAL_P(value) ? 1 : 0;
return SUCCESS;
diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c
index 61fba9f131..0db82c6068 100644
--- a/ext/pdo/pdo_sql_parser.c
+++ b/ext/pdo/pdo_sql_parser.c
@@ -586,7 +586,7 @@ safe:
case IS_FALSE:
case IS_TRUE:
- convert_to_int(&tmp_param);
+ convert_to_long(&tmp_param);
/* fall through */
case IS_LONG:
case IS_DOUBLE:
diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re
index e2723bb883..94ad04b983 100644
--- a/ext/pdo/pdo_sql_parser.re
+++ b/ext/pdo/pdo_sql_parser.re
@@ -248,7 +248,7 @@ safe:
case IS_FALSE:
case IS_TRUE:
- convert_to_int(&tmp_param);
+ convert_to_long(&tmp_param);
/* fall through */
case IS_LONG:
case IS_DOUBLE:
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 175e52885d..afbe068e3f 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -328,7 +328,7 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
convert_to_string(parameter);
}
} else if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_INT && (Z_TYPE_P(parameter) == IS_FALSE || Z_TYPE_P(parameter) == IS_TRUE)) {
- convert_to_int(parameter);
+ convert_to_long(parameter);
} else if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL && Z_TYPE_P(parameter) == IS_LONG) {
convert_to_boolean(parameter);
}
@@ -639,7 +639,7 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ
if (type != new_type) {
switch (new_type) {
case PDO_PARAM_INT:
- convert_to_int_ex(dest);
+ convert_to_long_ex(dest);
break;
case PDO_PARAM_BOOL:
convert_to_boolean_ex(dest);
@@ -1470,7 +1470,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0;
break;
case 2:
- convert_to_int(arg2);
+ convert_to_long(arg2);
stmt->fetch.column = Z_LVAL_P(arg2);
break;
case 3:
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h
index 7368a07126..279619ee0d 100644
--- a/ext/pdo/php_pdo_driver.h
+++ b/ext/pdo/php_pdo_driver.h
@@ -199,7 +199,7 @@ static inline zend_long pdo_attr_lval(zval *options, enum pdo_attribute_type opt
zval *v;
if (options && (v = zend_hash_index_find(Z_ARRVAL_P(options), option_name))) {
- convert_to_int_ex(v);
+ convert_to_long_ex(v);
return Z_LVAL_P(v);
}
return defval;
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index 6243a47e07..0cf5b55bdd 100644
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -400,7 +400,7 @@ static int pdo_mysql_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val TSR
PDO_DBG_RETURN(1);
#ifndef PDO_USE_MYSQLND
case PDO_MYSQL_ATTR_MAX_BUFFER_SIZE:
- convert_to_int(val);
+ convert_to_long(val);
if (Z_LVAL_P(val) < 0) {
/* TODO: Johannes, can we throw a warning here? */
((pdo_mysql_db_handle *)dbh->driver_data)->max_buffer_size = 1024*1024;
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c
index e9d297cab8..a8e7913fa7 100644
--- a/ext/pdo_oci/oci_driver.c
+++ b/ext/pdo_oci/oci_driver.c
@@ -456,7 +456,7 @@ static int oci_handle_set_attribute(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_
dbh->in_txn = 0;
}
- convert_to_int(val);
+ convert_to_long(val);
dbh->auto_commit = Z_LVAL_P(val);
return 1;
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index e56fae34ba..edbfc5bcb7 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -1117,16 +1117,16 @@ static int pdo_pgsql_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val TSRMLS_D
switch (attr) {
case PDO_ATTR_EMULATE_PREPARES:
- convert_to_int(val);
+ convert_to_long(val);
H->emulate_prepares = Z_LVAL_P(val);
return 1;
case PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT:
- convert_to_int(val);
+ convert_to_long(val);
php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated, use PDO::ATTR_EMULATE_PREPARES instead");
H->disable_native_prepares = Z_LVAL_P(val);
return 1;
case PDO_PGSQL_ATTR_DISABLE_PREPARES:
- convert_to_int(val);
+ convert_to_long(val);
H->disable_prepares = Z_LVAL_P(val);
return 1;
default:
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index da69448d5d..1fff450623 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -301,7 +301,7 @@ static int pdo_sqlite_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val TSRMLS_
switch (attr) {
case PDO_ATTR_TIMEOUT:
- convert_to_int(val);
+ convert_to_long(val);
sqlite3_busy_timeout(H->db, Z_LVAL_P(val) * 1000);
return 1;
}
@@ -497,7 +497,7 @@ static int php_sqlite3_collation_callback(void *context,
php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while invoking the callback");
} else if (!Z_ISUNDEF(retval)) {
if (Z_TYPE(retval) != IS_LONG) {
- convert_to_int_ex(&retval);
+ convert_to_long_ex(&retval);
}
ret = 0;
if (Z_LVAL(retval) > 0) {
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c
index feaff73b94..2cf271c0d3 100644
--- a/ext/pdo_sqlite/sqlite_statement.c
+++ b/ext/pdo_sqlite/sqlite_statement.c
@@ -117,7 +117,7 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
return 1;
}
} else {
- convert_to_int(parameter);
+ convert_to_long(parameter);
#if ZEND_LONG_MAX > 2147483647
if (SQLITE_OK == sqlite3_bind_int64(S->stmt, param->paramno + 1, Z_LVAL_P(parameter))) {
return 1;
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 03a4051efb..eeed36427a 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -1306,7 +1306,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
connstring = Z_STRVAL(args[0]);
} else if (ZEND_NUM_ARGS() == 2 ) { /* Safe to add conntype_option, since 2 args was illegal */
connstring = Z_STRVAL(args[0]);
- convert_to_int_ex(&args[1]);
+ convert_to_long_ex(&args[1]);
connect_type = Z_LVAL(args[1]);
} else {
host = Z_STRVAL(args[0]);
@@ -2630,7 +2630,7 @@ PHP_FUNCTION(pg_fetch_result)
field_offset = PQfnumber(pgsql_result, Z_STRVAL_P(field));
break;
default:
- convert_to_int_ex(field);
+ convert_to_long_ex(field);
field_offset = Z_LVAL_P(field);
break;
}
@@ -2684,7 +2684,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
if (zrow == NULL) {
row = -1;
} else {
- convert_to_int(zrow);
+ convert_to_long(zrow);
row = Z_LVAL_P(zrow);
if (row < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The row parameter must be greater or equal to zero");
@@ -2983,7 +2983,7 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
field_offset = PQfnumber(pgsql_result, Z_STRVAL_P(field));
break;
default:
- convert_to_int_ex(field);
+ convert_to_long_ex(field);
field_offset = Z_LVAL_P(field);
break;
}
@@ -5859,7 +5859,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
case IS_DOUBLE:
ZVAL_DOUBLE(&new_val, Z_DVAL_P(val));
- convert_to_int_ex(&new_val);
+ convert_to_long_ex(&new_val);
break;
case IS_LONG:
@@ -5998,14 +5998,14 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
}
else {
ZVAL_STRINGL(&new_val, Z_STRVAL_P(val), Z_STRLEN_P(val));
- convert_to_int_ex(&new_val);
+ convert_to_long_ex(&new_val);
}
}
break;
case IS_DOUBLE:
ZVAL_DOUBLE(&new_val, Z_DVAL_P(val));
- convert_to_int_ex(&new_val);
+ convert_to_long_ex(&new_val);
break;
case IS_LONG:
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 97ec81174f..836b65e8f4 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -738,7 +738,7 @@ PHP_FUNCTION(posix_ttyname)
}
break;
default:
- convert_to_int_ex(z_fd);
+ convert_to_long_ex(z_fd);
fd = Z_LVAL_P(z_fd);
}
#if defined(ZTS) && defined(HAVE_TTYNAME_R) && defined(_SC_TTY_NAME_MAX)
@@ -783,7 +783,7 @@ PHP_FUNCTION(posix_isatty)
}
break;
default:
- convert_to_int_ex(z_fd);
+ convert_to_long_ex(z_fd);
fd = Z_LVAL_P(z_fd);
}
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 10bd44ce5d..22db04c86e 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -284,7 +284,7 @@ PHP_FUNCTION(readline_info)
} else if (!strcasecmp(what, "done")) {
oldval = rl_done;
if (value) {
- convert_to_int_ex(value);
+ convert_to_long_ex(value);
rl_done = Z_LVAL_P(value);
}
RETVAL_LONG(oldval);
@@ -304,7 +304,7 @@ PHP_FUNCTION(readline_info)
} else if (!strcasecmp(what, "erase_empty_line")) {
oldval = rl_erase_empty_line;
if (value) {
- convert_to_int_ex(value);
+ convert_to_long_ex(value);
rl_erase_empty_line = Z_LVAL_PP(value);
}
RETVAL_LONG(oldval);
@@ -322,7 +322,7 @@ PHP_FUNCTION(readline_info)
} else if (!strcasecmp(what, "attempted_completion_over")) {
oldval = rl_attempted_completion_over;
if (value) {
- convert_to_int_ex(value);
+ convert_to_long_ex(value);
rl_attempted_completion_over = Z_LVAL_P(value);
}
RETVAL_LONG(oldval);
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index a65fd30046..dad3b4674c 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1771,7 +1771,7 @@ static int cast_object(zval *object, int type, char *contents TSRMLS_DC)
convert_to_boolean(object);
break;
case IS_LONG:
- convert_to_int(object);
+ convert_to_long(object);
break;
case IS_DOUBLE:
convert_to_double(object);
@@ -1903,7 +1903,7 @@ static int sxe_count_elements(zval *object, zend_long *count TSRMLS_DC) /* {{{ *
zval_ptr_dtor(&intern->tmp);
}
ZVAL_ZVAL(&intern->tmp, &rv, 0, 0);
- convert_to_int(&intern->tmp);
+ convert_to_long(&intern->tmp);
*count = (zend_long)Z_LVAL(intern->tmp);
return SUCCESS;
}
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index bfd77d5b29..7f57143123 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -2196,7 +2196,7 @@ static int php_snmp_write_max_oids(php_snmp_object *snmp_object, zval *newval TS
if (Z_TYPE_P(newval) != IS_LONG) {
ztmp = *newval;
zval_copy_ctor(&ztmp);
- convert_to_int(&ztmp);
+ convert_to_long(&ztmp);
newval = &ztmp;
}
@@ -2223,7 +2223,7 @@ static int php_snmp_write_valueretrieval(php_snmp_object *snmp_object, zval *new
if (Z_TYPE_P(newval) != IS_LONG) {
ztmp = *newval;
zval_copy_ctor(&ztmp);
- convert_to_int(&ztmp);
+ convert_to_long(&ztmp);
newval = &ztmp;
}
@@ -2266,7 +2266,7 @@ static int php_snmp_write_oid_output_format(php_snmp_object *snmp_object, zval *
int ret = SUCCESS;
if (Z_TYPE_P(newval) != IS_LONG) {
ZVAL_COPY(&ztmp, newval);
- convert_to_int(&ztmp);
+ convert_to_long(&ztmp);
newval = &ztmp;
}
@@ -2299,7 +2299,7 @@ static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval
int ret = SUCCESS;
if (Z_TYPE_P(newval) != IS_LONG) {
ZVAL_COPY(&ztmp, newval);
- convert_to_int(&ztmp);
+ convert_to_long(&ztmp);
newval = &ztmp;
}
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 7dd6747c25..e04a0dda2c 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -1067,7 +1067,7 @@ static xmlNodePtr to_xml_long(encodeTypePtr type, zval *data, int style, xmlNode
zval_copy_ctor(&tmp);
if (Z_TYPE(tmp) != IS_LONG) {
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
}
convert_to_string(&tmp);
xmlNodeSetContentLen(ret, BAD_CAST(Z_STRVAL(tmp)), Z_STRLEN(tmp));
diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c
index 69ea21f9df..b9e2499308 100644
--- a/ext/sockets/conversions.c
+++ b/ext/sockets/conversions.c
@@ -323,7 +323,7 @@ long_case:
/* if not long we're operating on lzval */
case IS_DOUBLE:
double_case:
- convert_to_int(&lzval);
+ convert_to_long(&lzval);
goto long_case;
case IS_OBJECT:
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c
index 4834bb39e0..d0bddf674a 100644
--- a/ext/sockets/multicast.c
+++ b/ext/sockets/multicast.c
@@ -288,7 +288,7 @@ int php_do_setsockopt_ip_mcast(php_socket *php_sock,
goto ipv4_loop_ttl;
case IP_MULTICAST_TTL:
- convert_to_int_ex(arg4);
+ convert_to_long_ex(arg4);
if (Z_LVAL_P(arg4) < 0L || Z_LVAL_P(arg4) > 255L) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Expected a value between 0 and 255");
@@ -353,7 +353,7 @@ int php_do_setsockopt_ipv6_mcast(php_socket *php_sock,
ov = (int) Z_TYPE_P(arg4) == IS_TRUE;
goto ipv6_loop_hops;
case IPV6_MULTICAST_HOPS:
- convert_to_int_ex(arg4);
+ convert_to_long_ex(arg4);
if (Z_LVAL_P(arg4) < -1L || Z_LVAL_P(arg4) > 255L) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Expected a value between -1 and 255");
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index e8e03ae0e3..e8b598b1e7 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -864,7 +864,7 @@ PHP_FUNCTION(socket_select)
if (Z_TYPE_P(sec) != IS_LONG) {
tmp = *sec;
zval_copy_ctor(&tmp);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
sec = &tmp;
}
@@ -2000,8 +2000,8 @@ PHP_FUNCTION(socket_set_option)
RETURN_FALSE;
}
- convert_to_int_ex(l_onoff);
- convert_to_int_ex(l_linger);
+ convert_to_long_ex(l_onoff);
+ convert_to_long_ex(l_linger);
lv.l_onoff = (unsigned short)Z_LVAL_P(l_onoff);
lv.l_linger = (unsigned short)Z_LVAL_P(l_linger);
@@ -2028,8 +2028,8 @@ PHP_FUNCTION(socket_set_option)
RETURN_FALSE;
}
- convert_to_int_ex(sec);
- convert_to_int_ex(usec);
+ convert_to_long_ex(sec);
+ convert_to_long_ex(usec);
#ifndef PHP_WIN32
tv.tv_sec = Z_LVAL_P(sec);
tv.tv_usec = Z_LVAL_P(usec);
@@ -2057,7 +2057,7 @@ PHP_FUNCTION(socket_set_option)
default:
default_case:
- convert_to_int_ex(arg4);
+ convert_to_long_ex(arg4);
ov = Z_LVAL_P(arg4);
optlen = sizeof(ov);
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 4b3a6eef15..2a841a5cc4 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -1449,7 +1449,7 @@ int spl_array_object_count_elements(zval *object, zend_long *count TSRMLS_DC) /*
if (Z_TYPE(rv) != IS_UNDEF) {
zval_ptr_dtor(&intern->retval);
ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
- convert_to_int(&intern->retval);
+ convert_to_long(&intern->retval);
*count = (zend_long)Z_LVAL(intern->retval);
return SUCCESS;
}
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index 825951e5f2..927d835bce 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -484,7 +484,7 @@ static int spl_dllist_object_count_elements(zval *object, zend_long *count TSRML
if (!Z_ISUNDEF(rv)) {
zval_ptr_dtor(&intern->retval);
ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
- convert_to_int(&intern->retval);
+ convert_to_long(&intern->retval);
*count = (zend_long) Z_LVAL(intern->retval);
return SUCCESS;
}
@@ -754,7 +754,7 @@ SPL_METHOD(SplDoublyLinkedList, offsetExists)
}
intern = Z_SPLDLLIST_P(getThis());
- index = spl_offset_convert_to_int(zindex TSRMLS_CC);
+ index = spl_offset_convert_to_long(zindex TSRMLS_CC);
RETURN_BOOL(index >= 0 && index < intern->llist->count);
} /* }}} */
@@ -773,7 +773,7 @@ SPL_METHOD(SplDoublyLinkedList, offsetGet)
}
intern = Z_SPLDLLIST_P(getThis());
- index = spl_offset_convert_to_int(zindex TSRMLS_CC);
+ index = spl_offset_convert_to_long(zindex TSRMLS_CC);
if (index < 0 || index >= intern->llist->count) {
zend_throw_exception(spl_ce_OutOfRangeException, "Offset invalid or out of range", 0 TSRMLS_CC);
@@ -811,7 +811,7 @@ SPL_METHOD(SplDoublyLinkedList, offsetSet)
zend_long index;
spl_ptr_llist_element *element;
- index = spl_offset_convert_to_int(zindex TSRMLS_CC);
+ index = spl_offset_convert_to_long(zindex TSRMLS_CC);
if (index < 0 || index >= intern->llist->count) {
zval_ptr_dtor(value);
@@ -859,7 +859,7 @@ SPL_METHOD(SplDoublyLinkedList, offsetUnset)
}
intern = Z_SPLDLLIST_P(getThis());
- index = spl_offset_convert_to_int(zindex TSRMLS_CC);
+ index = spl_offset_convert_to_long(zindex TSRMLS_CC);
llist = intern->llist;
if (index < 0 || index >= intern->llist->count) {
@@ -1228,7 +1228,7 @@ SPL_METHOD(SplDoublyLinkedList, add)
}
intern = Z_SPLDLLIST_P(getThis());
- index = spl_offset_convert_to_int(zindex TSRMLS_CC);
+ index = spl_offset_convert_to_long(zindex TSRMLS_CC);
if (index < 0 || index > intern->llist->count) {
zend_throw_exception(spl_ce_OutOfRangeException, "Offset invalid or out of range", 0 TSRMLS_CC);
diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c
index cb069efcb1..99a18c69f0 100644
--- a/ext/spl/spl_engine.c
+++ b/ext/spl/spl_engine.c
@@ -40,7 +40,7 @@ PHPAPI void spl_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC)
}
/* }}} */
-PHPAPI zend_long spl_offset_convert_to_int(zval *offset TSRMLS_DC) /* {{{ */
+PHPAPI zend_long spl_offset_convert_to_long(zval *offset TSRMLS_DC) /* {{{ */
{
zend_ulong idx;
diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h
index aed8967bd4..fc82b4fe53 100644
--- a/ext/spl/spl_engine.h
+++ b/ext/spl/spl_engine.h
@@ -27,7 +27,7 @@
PHPAPI void spl_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC);
-PHPAPI zend_long spl_offset_convert_to_int(zval *offset TSRMLS_DC);
+PHPAPI zend_long spl_offset_convert_to_long(zval *offset TSRMLS_DC);
/* {{{ spl_instantiate_arg_ex1 */
static inline int spl_instantiate_arg_ex1(zend_class_entry *pce, zval *retval, zval *arg1 TSRMLS_DC)
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index acdd9dd137..a025a376ab 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -338,7 +338,7 @@ static inline zval *spl_fixedarray_object_read_dimension_helper(spl_fixedarray_o
}
if (Z_TYPE_P(offset) != IS_LONG) {
- index = spl_offset_convert_to_int(offset TSRMLS_CC);
+ index = spl_offset_convert_to_long(offset TSRMLS_CC);
} else {
index = Z_LVAL_P(offset);
}
@@ -393,7 +393,7 @@ static inline void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_o
}
if (Z_TYPE_P(offset) != IS_LONG) {
- index = spl_offset_convert_to_int(offset TSRMLS_CC);
+ index = spl_offset_convert_to_long(offset TSRMLS_CC);
} else {
index = Z_LVAL_P(offset);
}
@@ -441,7 +441,7 @@ static inline void spl_fixedarray_object_unset_dimension_helper(spl_fixedarray_o
zend_long index;
if (Z_TYPE_P(offset) != IS_LONG) {
- index = spl_offset_convert_to_int(offset TSRMLS_CC);
+ index = spl_offset_convert_to_long(offset TSRMLS_CC);
} else {
index = Z_LVAL_P(offset);
}
@@ -480,7 +480,7 @@ static inline int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_obje
int retval;
if (Z_TYPE_P(offset) != IS_LONG) {
- index = spl_offset_convert_to_int(offset TSRMLS_CC);
+ index = spl_offset_convert_to_long(offset TSRMLS_CC);
} else {
index = Z_LVAL_P(offset);
}
@@ -539,7 +539,7 @@ static int spl_fixedarray_object_count_elements(zval *object, zend_long *count T
if (!Z_ISUNDEF(rv)) {
zval_ptr_dtor(&intern->retval);
ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
- convert_to_int(&intern->retval);
+ convert_to_long(&intern->retval);
*count = (zend_long) Z_LVAL(intern->retval);
return SUCCESS;
}
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c
index 0910686c4f..b0f06ada69 100644
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@ -114,7 +114,7 @@ static int spl_ptr_heap_cmp_cb_helper(zval *object, spl_heap_object *heap_object
return FAILURE;
}
- convert_to_int(&zresult);
+ convert_to_long(&zresult);
*result = Z_LVAL(zresult);
zval_ptr_dtor(&zresult);
@@ -493,7 +493,7 @@ static int spl_heap_object_count_elements(zval *object, zend_long *count TSRMLS_
if (!Z_ISUNDEF(rv)) {
zval_ptr_dtor(&intern->retval);
ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
- convert_to_int(&intern->retval);
+ convert_to_long(&intern->retval);
*count = (zend_long) Z_LVAL(intern->retval);
return SUCCESS;
}
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index 129997e799..4ec6ae7293 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -1495,7 +1495,7 @@ PHP_METHOD(sqlite3stmt, execute)
switch (param->type) {
case SQLITE_INTEGER:
- convert_to_int(parameter);
+ convert_to_long(parameter);
#if ZEND_LONG_MAX > 2147483647
sqlite3_bind_int64(stmt_obj->stmt, param->param_number, Z_LVAL_P(parameter));
#else
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 7079c64538..81ecfd74f1 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2684,7 +2684,7 @@ zend_bool array_column_param_helper(zval *param,
const char *name TSRMLS_DC) {
switch (Z_TYPE_P(param)) {
case IS_DOUBLE:
- convert_to_int_ex(param);
+ convert_to_long_ex(param);
/* fallthrough */
case IS_LONG:
return 1;
@@ -3035,7 +3035,7 @@ static int zval_compare(zval *a, zval *b TSRMLS_DC) /* {{{ */
return ZEND_NORMALIZE_BOOL(Z_DVAL(result));
}
- convert_to_int(&result);
+ convert_to_long(&result);
return ZEND_NORMALIZE_BOOL(Z_LVAL(result));
}
/* }}} */
diff --git a/ext/standard/filters.c b/ext/standard/filters.c
index f7ddbf5a39..9ab9f652fe 100644
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@ -1244,7 +1244,7 @@ static php_conv_err_t php_conv_get_long_prop_ex(const HashTable *ht, zend_long *
if (Z_TYPE_PP(tmpval) != IS_LONG) {
tmp = *ztval;
zval_copy_ctor(&tmp);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
ztval = &tmp;
}
*pretval = Z_LVAL_P(ztval);
@@ -1266,7 +1266,7 @@ static php_conv_err_t php_conv_get_ulong_prop_ex(const HashTable *ht, zend_ulong
if (Z_TYPE_P(tmpval) != IS_LONG) {
ZVAL_DUP(&tmp, tmpval);;
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
tmpval = &tmp;
}
if (Z_LVAL_P(tmpval) < 0) {
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 8a99faa665..3196803a97 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -1157,7 +1157,7 @@ PHP_FUNCTION(decbin)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) {
return;
}
- convert_to_int_ex(arg);
+ convert_to_long_ex(arg);
result = _php_math_longtobase(arg, 2 TSRMLS_CC);
RETURN_STR(result);
}
@@ -1173,7 +1173,7 @@ PHP_FUNCTION(decoct)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) {
return;
}
- convert_to_int_ex(arg);
+ convert_to_long_ex(arg);
result = _php_math_longtobase(arg, 8 TSRMLS_CC);
RETURN_STR(result);
}
@@ -1189,7 +1189,7 @@ PHP_FUNCTION(dechex)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) {
return;
}
- convert_to_int_ex(arg);
+ convert_to_long_ex(arg);
result = _php_math_longtobase(arg, 16 TSRMLS_CC);
RETURN_STR(result);
}
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 556a96d374..d0792c1c17 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -89,7 +89,7 @@ static void php_pack(zval *val, size_t size, int *map, char *output)
int i;
char *v;
- convert_to_int_ex(val);
+ convert_to_long_ex(val);
v = (char *) &Z_LVAL_P(val);
for (i = 0; i < size; i++) {
diff --git a/ext/standard/password.c b/ext/standard/password.c
index 73d468d126..d6be48f5e2 100644
--- a/ext/standard/password.c
+++ b/ext/standard/password.c
@@ -245,7 +245,7 @@ PHP_FUNCTION(password_needs_rehash)
if (Z_TYPE_P(option_buffer) != IS_LONG) {
zval cast_option_buffer;
ZVAL_DUP(&cast_option_buffer, option_buffer);
- convert_to_int(&cast_option_buffer);
+ convert_to_long(&cast_option_buffer);
new_cost = Z_LVAL(cast_option_buffer);
zval_dtor(&cast_option_buffer);
} else {
@@ -327,7 +327,7 @@ PHP_FUNCTION(password_hash)
if (Z_TYPE_P(option_buffer) != IS_LONG) {
zval cast_option_buffer;
ZVAL_DUP(&cast_option_buffer, option_buffer);
- convert_to_int(&cast_option_buffer);
+ convert_to_long(&cast_option_buffer);
cost = Z_LVAL(cast_option_buffer);
zval_dtor(&cast_option_buffer);
} else {
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index 7ae0df6df5..83fd551c19 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -1190,7 +1190,7 @@ done:
scan_set_error_return( numVars, return_value );
result = SCAN_ERROR_EOF;
} else if (numVars) {
- convert_to_int(return_value );
+ convert_to_long(return_value );
Z_LVAL_P(return_value) = nconversions;
} else if (nconversions < totalVars) {
/* TODO: not all elements converted. we need to prune the list - cc */
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index a0448803f4..d69b7eb816 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -763,7 +763,7 @@ PHP_FUNCTION(stream_select)
/* If seconds is not set to null, build the timeval, else we wait indefinitely */
if (sec != NULL) {
- convert_to_int_ex(sec);
+ convert_to_long_ex(sec);
if (Z_LVAL_P(sec) < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The seconds parameter must be greater than 0");
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 325c66affa..0628a4664c 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1680,7 +1680,7 @@ static int php_needle_char(zval *needle, char *target TSRMLS_DC)
{
zval holder = *needle;
zval_copy_ctor(&(holder));
- convert_to_int(&(holder));
+ convert_to_long(&(holder));
if(Z_TYPE(holder) != IS_LONG) {
return FAILURE;
}
@@ -2328,7 +2328,7 @@ PHP_FUNCTION(substr_replace)
convert_to_string_ex(repl);
}
if (Z_TYPE_P(from) != IS_ARRAY) {
- convert_to_int_ex(from);
+ convert_to_long_ex(from);
}
if (argc > 3) {
diff --git a/ext/standard/type.c b/ext/standard/type.c
index 0ac849d81e..08df1d830a 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -103,9 +103,9 @@ PHP_FUNCTION(settype)
ZVAL_DEREF(var);
SEPARATE_ZVAL_NOREF(var);
if (!strcasecmp(type, "integer")) {
- convert_to_int(var);
+ convert_to_long(var);
} else if (!strcasecmp(type, "int")) {
- convert_to_int(var);
+ convert_to_long(var);
} else if (!strcasecmp(type, "float")) {
convert_to_double(var);
} else if (!strcasecmp(type, "double")) { /* deprecated */
@@ -156,7 +156,7 @@ PHP_FUNCTION(intval)
#endif
RETVAL_ZVAL(num, 1, 0);
- convert_to_int_base(return_value, base);
+ convert_to_long_base(return_value, base);
}
/* }}} */
diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
index 560fd9b910..ec0aea7e71 100644
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@ -220,7 +220,7 @@ php_stream_filter_status_t userfilter_filter(
zval_ptr_dtor(&func_name);
if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF) {
- convert_to_int(&retval);
+ convert_to_long(&retval);
ret = Z_LVAL(retval);
} else if (call_result == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to call filter function");
diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c
index e6bb6a0a23..c9e99e1db3 100644
--- a/ext/sybase_ct/php_sybase_ct.c
+++ b/ext/sybase_ct/php_sybase_ct.c
@@ -2076,7 +2076,7 @@ PHP_FUNCTION(sybase_result)
break;
}
default:
- convert_to_int(field);
+ convert_to_long(field);
field_offset = Z_LVAL_P(field);
if (field_offset < 0 || field_offset >= result->num_fields) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Bad column offset specified");
diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c
index 4c63d1902d..d6b8638ddd 100644
--- a/ext/sysvmsg/sysvmsg.c
+++ b/ext/sysvmsg/sysvmsg.c
@@ -171,19 +171,19 @@ PHP_FUNCTION(msg_set_queue)
/* now pull out members of data and set them in the stat buffer */
if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_perm.uid", sizeof("msg_perm.uid") - 1)) != NULL) {
- convert_to_int_ex(item);
+ convert_to_long_ex(item);
stat.msg_perm.uid = Z_LVAL_P(item);
}
if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_perm.gid", sizeof("msg_perm.gid") - 1)) != NULL) {
- convert_to_int_ex(item);
+ convert_to_long_ex(item);
stat.msg_perm.gid = Z_LVAL_P(item);
}
if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_perm.mode", sizeof("msg_perm.mode") - 1)) != NULL) {
- convert_to_int_ex(item);
+ convert_to_long_ex(item);
stat.msg_perm.mode = Z_LVAL_P(item);
}
if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_qbytes", sizeof("msg_qbytes") - 1)) != NULL) {
- convert_to_int_ex(item);
+ convert_to_long_ex(item);
stat.msg_qbytes = Z_LVAL_P(item);
}
if (msgctl(mq->id, IPC_SET, &stat) == 0) {
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index ed7f00715b..9d35326ef0 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -526,7 +526,7 @@ static int _php_tidy_set_tidy_opt(TidyDoc doc, char *optname, zval *value TSRMLS
case TidyInteger:
if (Z_TYPE(conv) != IS_LONG) {
zval_copy_ctor(&conv);
- convert_to_int(&conv);
+ convert_to_long(&conv);
}
if (tidyOptSetInt(doc, tidyOptGetId(opt), Z_LVAL(conv))) {
return SUCCESS;
@@ -536,7 +536,7 @@ static int _php_tidy_set_tidy_opt(TidyDoc doc, char *optname, zval *value TSRMLS
case TidyBoolean:
if (Z_TYPE(conv) != IS_LONG) {
zval_copy_ctor(&conv);
- convert_to_int(&conv);
+ convert_to_long(&conv);
}
if (tidyOptSetBool(doc, tidyOptGetId(opt), Z_LVAL(conv))) {
return SUCCESS;
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index a2bcb105f9..6581d4c585 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -1041,7 +1041,7 @@ int _xml_externalEntityRefHandler(XML_Parser parserPtr,
_xml_xmlchar_zval(publicId, 0, parser->target_encoding, &args[4]);
xml_call_handler(parser, &parser->externalEntityRefHandler, parser->externalEntityRefPtr, 5, args, &retval);
if (!Z_ISUNDEF(retval)) {
- convert_to_int(&retval);
+ convert_to_long(&retval);
ret = Z_LVAL(retval);
} else {
ret = 0;
@@ -1554,15 +1554,15 @@ PHP_FUNCTION(xml_parser_set_option)
switch (opt) {
case PHP_XML_OPTION_CASE_FOLDING:
- convert_to_int_ex(val);
+ convert_to_long_ex(val);
parser->case_folding = Z_LVAL_P(val);
break;
case PHP_XML_OPTION_SKIP_TAGSTART:
- convert_to_int_ex(val);
+ convert_to_long_ex(val);
parser->toffset = Z_LVAL_P(val);
break;
case PHP_XML_OPTION_SKIP_WHITE:
- convert_to_int_ex(val);
+ convert_to_long_ex(val);
parser->skipwhite = Z_LVAL_P(val);
break;
case PHP_XML_OPTION_TARGET_ENCODING: {
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c
index 42430b13df..ce8ad2889b 100644
--- a/ext/xmlrpc/xmlrpc-epi-php.c
+++ b/ext/xmlrpc/xmlrpc-epi-php.c
@@ -528,7 +528,7 @@ static XMLRPC_VALUE PHP_to_XMLRPC_worker (const char* key, zval* in_val, int dep
xReturn = XMLRPC_CreateValueBoolean(key, Z_TYPE(val) == IS_TRUE);
break;
case xmlrpc_int:
- convert_to_int(&val);
+ convert_to_long(&val);
xReturn = XMLRPC_CreateValueInt(key, Z_LVAL(val));
break;
case xmlrpc_double:
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index 04aef6083e..92c04c3ed2 100644
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -437,7 +437,7 @@ PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet)
ZVAL_STRING(&member, "cloneDocument");
cloneDocu = std_hnd->read_property(id, &member, BP_VAR_IS, NULL, &rv TSRMLS_CC);
if (Z_TYPE_P(cloneDocu) != IS_NULL) {
- convert_to_int(cloneDocu);
+ convert_to_long(cloneDocu);
clone_docu = Z_LVAL_P(cloneDocu);
}
zval_ptr_dtor(&member);
@@ -536,7 +536,7 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl
ZVAL_STRING(&member, "doXInclude");
doXInclude = std_hnd->read_property(id, &member, BP_VAR_IS, NULL, &rv TSRMLS_CC);
if (Z_TYPE_P(doXInclude) != IS_NULL) {
- convert_to_int(doXInclude);
+ convert_to_long(doXInclude);
ctxt->xinclude = Z_LVAL_P(doXInclude);
}
zval_ptr_dtor(&member);
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 4af78340c4..ec9d1b0202 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -319,7 +319,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char
if (Z_TYPE_P(option) != IS_LONG) {
zval tmp;
ZVAL_DUP(&tmp, option);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
opt = Z_LVAL(tmp);
} else {
opt = Z_LVAL_P(option);
diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c
index 6be0b02962..53bc2e4269 100644
--- a/ext/zlib/zlib_filter.c
+++ b/ext/zlib/zlib_filter.c
@@ -332,7 +332,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
/* log-2 base of history window (9 - 15) */
ZVAL_DUP(&tmp, tmpzval);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
if (Z_LVAL(tmp) < -MAX_WBITS || Z_LVAL(tmp) > MAX_WBITS + 32) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%pd)", Z_LVAL(tmp));
} else {
@@ -363,7 +363,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
case IS_OBJECT:
if ((tmpzval = zend_hash_str_find(HASH_OF(filterparams), "memory", sizeof("memory") -1))) {
ZVAL_DUP(&tmp, tmpzval);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
/* Memory Level (1 - 9) */
if (Z_LVAL(tmp) < 1 || Z_LVAL(tmp) > MAX_MEM_LEVEL) {
@@ -375,7 +375,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
if ((tmpzval = zend_hash_str_find(HASH_OF(filterparams), "window", sizeof("window") - 1))) {
ZVAL_DUP(&tmp, tmpzval);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
/* log-2 base of history window (9 - 15) */
if (Z_LVAL(tmp) < -MAX_WBITS || Z_LVAL(tmp) > MAX_WBITS + 16) {
@@ -398,7 +398,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
ZVAL_COPY_VALUE(&tmp, filterparams);
factory_setlevel:
zval_copy_ctor(&tmp);
- convert_to_int(&tmp);
+ convert_to_long(&tmp);
/* Set compression level within reason (-1 == default, 0 == none, 1-9 == least to most compression */
if (Z_LVAL(tmp) < -1 || Z_LVAL(tmp) > 9) {
diff --git a/main/php_ini.c b/main/php_ini.c
index c94e412094..783802c806 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -884,7 +884,7 @@ PHPAPI int cfg_get_long(const char *varname, zend_long *result)
return FAILURE;
}
ZVAL_DUP(&var, tmp);
- convert_to_int(&var);
+ convert_to_long(&var);
*result = Z_LVAL(var);
return SUCCESS;
}
diff --git a/main/streams/transports.c b/main/streams/transports.c
index a0c8d61aa6..b1f0acfa73 100644
--- a/main/streams/transports.c
+++ b/main/streams/transports.c
@@ -163,7 +163,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, in
if (PHP_STREAM_CONTEXT(stream) && (zbacklog = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "backlog")) != NULL) {
zval *ztmp = zbacklog;
- convert_to_int_ex(ztmp);
+ convert_to_long_ex(ztmp);
backlog = Z_LVAL_P(ztmp);
if (ztmp != zbacklog) {
zval_ptr_dtor(ztmp);
diff --git a/main/streams/userspace.c b/main/streams/userspace.c
index 26a956c362..1a20fad1fe 100644
--- a/main/streams/userspace.c
+++ b/main/streams/userspace.c
@@ -608,7 +608,7 @@ static size_t php_userstreamop_write(php_stream *stream, const char *buf, size_t
didwrite = 0;
if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF) {
- convert_to_int(&retval);
+ convert_to_long(&retval);
didwrite = Z_LVAL(retval);
} else if (call_result == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_WRITE " is not implemented!",
@@ -831,7 +831,7 @@ static int statbuf_from_array(zval *array, php_stream_statbuf *ssb TSRMLS_DC)
#define STAT_PROP_ENTRY_EX(name, name2) \
if (NULL != (elem = zend_hash_str_find(Z_ARRVAL_P(array), #name, sizeof(#name)-1))) { \
SEPARATE_ZVAL(elem); \
- convert_to_int(elem); \
+ convert_to_long(elem); \
ssb->sb.st_##name2 = Z_LVAL_P(elem); \
}