summaryrefslogtreecommitdiff
path: root/ext/simplexml
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-10-03 16:05:08 (GMT)
committerMarcus Boerger <helly@php.net>2005-10-03 16:05:08 (GMT)
commit308a64bc08a9c1f39619e83d9d6c502dd3edfdb8 (patch)
tree1d34ac7d2c66607aed6f58dfe1d60630ed422087 /ext/simplexml
parent42728f947c0ced85812439b24159d5a0b75594b5 (diff)
downloadphp-308a64bc08a9c1f39619e83d9d6c502dd3edfdb8.tar.gz
- MFH Really allow SXE being shared by not using anything from it directly in SPL
Diffstat (limited to 'ext/simplexml')
-rwxr-xr-xext/simplexml/php_simplexml_exports.h5
-rw-r--r--ext/simplexml/simplexml.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/ext/simplexml/php_simplexml_exports.h b/ext/simplexml/php_simplexml_exports.h
index 0b296df..db97da0 100755
--- a/ext/simplexml/php_simplexml_exports.h
+++ b/ext/simplexml/php_simplexml_exports.h
@@ -52,6 +52,11 @@ php_sxe_fetch_object(zval *object TSRMLS_DC)
ZEND_API void php_sxe_reset_iterator(php_sxe_object *sxe TSRMLS_DC);
ZEND_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC);
+typedef struct {
+ zend_object_iterator intern;
+ php_sxe_object *sxe;
+} php_sxe_iterator;
+
#endif /* PHP_SIMPLEXML_EXPORTS_H */
/**
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 8fbb01f..e42ab24 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1383,11 +1383,6 @@ SXE_METHOD(__construct)
/* }}} */
-typedef struct {
- zend_object_iterator intern;
- php_sxe_object *sxe;
-} php_sxe_iterator;
-
static void php_sxe_iterator_dtor(zend_object_iterator *iter TSRMLS_DC);
static int php_sxe_iterator_valid(zend_object_iterator *iter TSRMLS_DC);
static void php_sxe_iterator_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC);
@@ -1704,6 +1699,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;
+ sxe_class_entry->iterator_funcs.funcs = &php_sxe_iterator_funcs;
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;