com php-src: Merge branch 'PHP-7.4': ext/spl/spl_heap.c
| From: | Nikita Popov | Date: | Fri, 23 Aug 2019 13:37:07 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.4': ext/spl/spl_heap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108009@lists.php.net to get a copy of this message | ||
Commit: 51905cd2126d8f1523de01a4b5cbdb4f161758c0
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 23 Aug 2019 15:37:07 +0200
Parents: 38ed1e63533db4927b21c421d965373993ccc3eb 9173c21a35e42cbe98fac1e28bde300d1e27af61
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=51905cd2126d8f1523de01a4b5cbdb4f161758c0
Log:
Merge branch 'PHP-7.4'
Changed paths:
MM ext/spl/spl_heap.c
Diff:
diff --cc ext/spl/spl_heap.c
index 068cb32,8191c29..0afe0c9
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@@ -391,11 -402,9 +402,9 @@@ static zend_object *spl_heap_object_new
zend_object_std_init(&intern->std, class_type);
object_properties_init(&intern->std, class_type);
- intern->flags = 0;
- intern->fptr_cmp = NULL;
-
if (orig) {
- spl_heap_object *other = Z_SPLHEAP_P(orig);
+ spl_heap_object *other = spl_heap_from_obj(orig);
+ intern->std.handlers = other->std.handlers;
intern->ce_get_iterator = other->ce_get_iterator;
if (clone_orig) {
@@@ -543,17 -550,28 +546,28 @@@ static HashTable* spl_heap_object_get_d
}
/* }}} */
-static HashTable *spl_heap_object_get_gc(zval *obj, zval **gc_data, int *gc_data_count) /* {{{ */
+static HashTable *spl_heap_object_get_gc(zend_object *obj, zval **gc_data, int *gc_data_count) /*
{{{ */
{
- spl_heap_object *intern = Z_SPLHEAP_P(obj);
+ spl_heap_object *intern = spl_heap_from_obj(obj);
- *gc_data = intern->heap->elements;
+ *gc_data = (zval *) intern->heap->elements;
*gc_data_count = intern->heap->count;
return zend_std_get_properties(obj);
}
/* }}} */
-static HashTable *spl_pqueue_object_get_gc(zval *obj, zval **gc_data, int *gc_data_count) /* {{{
*/
++static HashTable *spl_pqueue_object_get_gc(zend_object *obj, zval **gc_data, int *gc_data_count)
/* {{{ */
+ {
- spl_heap_object *intern = Z_SPLHEAP_P(obj);
++ spl_heap_object *intern = spl_heap_from_obj(obj);
+ *gc_data = (zval *) intern->heap->elements;
+ /* Two zvals (value and priority) per pqueue entry */
+ *gc_data_count = 2 * intern->heap->count;
+
+ return zend_std_get_properties(obj);
+ }
+ /* }}} */
+
-static HashTable* spl_heap_object_get_debug_info(zval *obj, int *is_temp) /* {{{ */
+static HashTable* spl_heap_object_get_debug_info(zend_object *obj, int *is_temp) /* {{{ */
{
return spl_heap_object_get_debug_info_helper(spl_ce_SplHeap, obj, is_temp);
}