diff options
| author | Ondřej Surý <ondrej@sury.org> | 2013-01-21 14:07:09 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2013-01-21 14:07:09 +0100 |
| commit | 28f17d3b49950d50f3900f84d74d7cc0822b123d (patch) | |
| tree | ad028981f4d7690513d968ae373653ee8913a62e /ext/simplexml/simplexml.c | |
| parent | 9036b58b9a461740c964cbcfa4493f0bcad435bd (diff) | |
| download | php-upstream/5.4.11.tar.gz | |
Imported Upstream version 5.4.11upstream/5.4.11
Diffstat (limited to 'ext/simplexml/simplexml.c')
| -rw-r--r-- | ext/simplexml/simplexml.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 5514f0fc8..692516840 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -1081,15 +1081,9 @@ static HashTable * sxe_get_prop_hash(zval *object, int is_debug TSRMLS_DC) /* {{ zend_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0); } else if (sxe->properties) { - if (GC_G(gc_active)) { - return sxe->properties; - } zend_hash_clean(sxe->properties); rv = sxe->properties; } else { - if (GC_G(gc_active)) { - return NULL; - } ALLOC_HASHTABLE(rv); zend_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0); sxe->properties = rv; @@ -1201,6 +1195,16 @@ next_iter: } /* }}} */ +static HashTable * sxe_get_gc(zval *object, zval ***table, int *n TSRMLS_DC) /* {{{ */ { + php_sxe_object *sxe; + sxe = php_sxe_fetch_object(object TSRMLS_CC); + + *table = NULL; + *n = 0; + return sxe->properties; +} +/* }}} */ + static HashTable * sxe_get_properties(zval *object TSRMLS_DC) /* {{{ */ { return sxe_get_prop_hash(object, 0 TSRMLS_CC); @@ -1966,7 +1970,9 @@ static zend_object_handlers sxe_object_handlers = { /* {{{ */ sxe_objects_compare, sxe_object_cast, sxe_count_elements, - sxe_get_debug_info + sxe_get_debug_info, + NULL, + sxe_get_gc }; /* }}} */ |
