com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/spl/spl_observer.c

From: Date: Sun, 20 Mar 2016 16:48:06 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/spl/spl_observer.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-91429@lists.php.net to get a copy of this message
Commit: 12f2665df829eac53e2036e335b40cf391ff8652 Author: Nikita Popov <nikic@php.net> Sun, 20 Mar 2016 17:48:06 +0100 Parents: a175aa9dcaed5e295d015ff73c663e06c2335155 cc3cdd00578006a5684e6dfaf81532a13326b9fe Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=12f2665df829eac53e2036e335b40cf391ff8652 Log: Merge branch 'PHP-5.6' into PHP-7.0 Conflicts: ext/spl/spl_observer.c Changed paths: MM NEWS MM ext/spl/spl_observer.c Diff: diff --cc NEWS index 0cccc6a,cf7edaf..f7d1c7d --- a/NEWS +++ b/NEWS @@@ -24,15 -17,13 +24,17 @@@ PH call constructor).. (Anatol) - SPL: + . Fixed bug #71838 (Deserializing serialized SPLObjectStorage-Object can't + access properties in PHP). (Nikita) + . Fixed bug #52339 (SPL autoloader breaks class_exists()). (Nikita) + . Fixed bug #67582 (Cloned SplObjectStorage with overwritten getHash fails + offsetExists()). (Nikita) - Standard: + . Fixed bug #71837 (Wrong arrays behaviour). (Laruence) . Fixed bug #71840 (Unserialize accepts wrongly data). (Ryat, Laruence) -31 Marc 2016, PHP 5.6.20 +31 Mar 2016 PHP 7.0.5 - CLI Server: . Fixed bug #69953 (Support MKCALENDAR request method). (Christoph) diff --cc ext/spl/spl_observer.c index 76b98a5,fb0b29f..c189205 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@@ -214,27 -256,25 +214,22 @@@ void spl_object_storage_addall(spl_SplO intern->index = 0; } /* }}} */ -static zend_object_value spl_object_storage_new_ex(zend_class_entry *class_type, spl_SplObjectStorage **obj, zval *orig TSRMLS_DC) /* {{{ */ +static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval *orig) /* {{{ */ { - zend_object_value retval; spl_SplObjectStorage *intern; - zend_class_entry *parent = class_type; + zend_class_entry *parent = class_type; - intern = emalloc(sizeof(spl_SplObjectStorage)); - memset(intern, 0, sizeof(spl_SplObjectStorage)); - *obj = intern; + intern = emalloc(sizeof(spl_SplObjectStorage) + zend_object_properties_size(parent)); + memset(intern, 0, sizeof(spl_SplObjectStorage) - sizeof(zval)); + intern->pos = HT_INVALID_IDX; - zend_object_std_init(&intern->std, class_type TSRMLS_CC); + zend_object_std_init(&intern->std, class_type); object_properties_init(&intern->std, class_type); - zend_hash_init(&intern->storage, 0, NULL, (void (*)(void *))spl_object_storage_dtor, 0); + zend_hash_init(&intern->storage, 0, NULL, spl_object_storage_dtor, 0); - retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_SplOjectStorage_free_storage, NULL TSRMLS_CC); - retval.handlers = &spl_handler_SplObjectStorage; + intern->std.handlers = &spl_handler_SplObjectStorage; - if (orig) { - spl_SplObjectStorage *other = Z_SPLOBJSTORAGE_P(orig); - spl_object_storage_addall(intern, orig, other); - } - while (parent) { if (parent == spl_ce_SplObjectStorage) { if (class_type != spl_ce_SplObjectStorage) { @@@ -249,7 -289,12 +244,12 @@@ parent = parent->parent; } + if (orig) { - spl_SplObjectStorage *other = (spl_SplObjectStorage*)zend_object_store_get_object(orig TSRMLS_CC); - spl_object_storage_addall(intern, orig, other TSRMLS_CC); ++ spl_SplObjectStorage *other = Z_SPLOBJSTORAGE_P(orig); ++ spl_object_storage_addall(intern, orig, other); + } + - return retval; + return &intern->std; } /* }}} */

« previous php.cvs (#91429) next »