diff options
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 }; /* }}} */ |
