diff options
author | Nikita Popov <nikic@php.net> | 2015-06-16 19:55:33 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-06-16 19:55:33 +0200 |
commit | fb346c8f9376d4a0be80e242406c1bb8dbf710f0 (patch) | |
tree | b811032a8d998fbd4d080fdc73bc3d0111aadaa9 /ext/spl/spl_heap.c | |
parent | 4448843b7c72e6fb28b67d20f9cc6b2519ff2798 (diff) | |
download | php-git-fb346c8f9376d4a0be80e242406c1bb8dbf710f0.tar.gz |
Support references in convert_to_*
conver_to_* functions now accept REFERENCE values, which will be
unwrapped before performing the usual conversion. This is consistent
with convert_scalar_to_number and matches the expected behavior in
a couple random use-sites I checked.
Also includes a couple fixes/cleanups elsewhere and two tests for
cases that previously didn't work (though the reference issue existed
all over the place).
Diffstat (limited to 'ext/spl/spl_heap.c')
-rw-r--r-- | ext/spl/spl_heap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index c4857663e7..1d8cde25fa 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -112,9 +112,7 @@ static int spl_ptr_heap_cmp_cb_helper(zval *object, spl_heap_object *heap_object return FAILURE; } - convert_to_long(&zresult); - *result = Z_LVAL(zresult); - + *result = zval_get_long(&zresult); zval_ptr_dtor(&zresult); return SUCCESS; |