summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-06-22 12:53:52 +0300
committerDmitry Stogov <dmitry@zend.com>2015-06-22 12:53:52 +0300
commitb97df475dfbfe5c7ddd883432eb3bcf3645803e9 (patch)
tree039436d60f049a37914b9e3030b97dac7c82eb47 /Zend/zend_operators.c
parent0da4c34f0e5957f4370a22bfcc0043efb1f59955 (diff)
downloadphp-git-b97df475dfbfe5c7ddd883432eb3bcf3645803e9.tar.gz
Fixed crash in Zend/tests/bug69891.phpt on x86 (32-bit).
compare_function() now has to be compatible with binary_op_type (use fastcall convention). Introduced new zval_compare_function() to be used as zval comparison callback instead of compare_function().
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 7e3b458bbe..26584745dc 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -1760,7 +1760,7 @@ static inline void zend_free_obj_get_result(zval *op) /* {{{ */
}
/* }}} */
-ZEND_API int compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+static zend_always_inline int i_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
int ret;
int converted = 0;
@@ -1942,6 +1942,18 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
}
/* }}} */
+ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+{
+ return i_compare_function(result, op1, op2);
+}
+/* }}} */
+
+ZEND_API int zval_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+{
+ return i_compare_function(result, op1, op2);
+}
+/* }}} */
+
static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */
{
zval result;