From 43b0a9e96b6b0e201980efea5077d86699d95a52 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 15 Jan 2004 09:28:01 +0000 Subject: [PATCH] Drop userspace iteration correctly. # People if you do such things then please fix the class tree. --- ext/simplexml/simplexml.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index ae76f40cb5..839791c772 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -31,11 +31,7 @@ #include "ext/standard/php_string.h" #include "php_simplexml.h" #include "zend_default_classes.h" - -#if HAVE_SPL && !defined(COMPILE_DL_SPL) -#include "ext/spl/spl_iterators.h" -#endif - +#include "zend_interfaces.h" zend_class_entry *sxe_class_entry; @@ -1483,11 +1479,7 @@ zend_module_entry simplexml_module_entry = { simplexml_functions, PHP_MINIT(simplexml), NULL, -#if HAVE_SPL && !defined(COMPILE_DL_SPL) - PHP_RINIT(simplexml), -#else NULL, -#endif NULL, PHP_MINFO(simplexml), "0.1", @@ -1524,6 +1516,7 @@ PHP_MINIT_FUNCTION(simplexml) sxe.create_object = sxe_object_new; sxe_class_entry = zend_register_internal_class(&sxe TSRMLS_CC); sxe_class_entry->get_iterator = php_sxe_get_iterator; + zend_class_implements(sxe_class_entry TSRMLS_CC, 1, zend_ce_traversable); sxe_object_handlers.get_method = zend_get_std_object_handlers()->get_method; sxe_object_handlers.get_constructor = zend_get_std_object_handlers()->get_constructor; sxe_object_handlers.get_class_entry = zend_get_std_object_handlers()->get_class_entry; @@ -1533,17 +1526,6 @@ PHP_MINIT_FUNCTION(simplexml) } /* }}} */ -#if HAVE_SPL && !defined(COMPILE_DL_SPL) -/* {{{ PHP_RINIT_FUNCTION(simplexml) - */ -PHP_RINIT_FUNCTION(simplexml) -{ - zend_class_implements(sxe_class_entry TSRMLS_CC, 1, spl_ce_RecursiveIterator); - return SUCCESS; -} -/* }}} */ -#endif - /* {{{ PHP_MINFO_FUNCTION(simplexml) */ PHP_MINFO_FUNCTION(simplexml) -- 2.50.1