cvs: php-src(PHP_5_1) /ext/simplexml config.m4 /ext/spl spl_sxe.c
| From: | Marcus Boerger | Date: | Sat, 01 Oct 2005 15:41:37 +0000 |
| Subject: | cvs: php-src(PHP_5_1) /ext/simplexml config.m4 /ext/spl spl_sxe.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-34210@lists.php.net to get a copy of this message | ||
helly Sat Oct 1 11:41:37 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src/ext/spl spl_sxe.c
/php-src/ext/simplexml config.m4
Log:
- Allow xpl/simplexml integration with simplexml being built shared
http://cvs.php.net/diff.php/php-src/ext/spl/spl_sxe.c?r1=1.8&r2=1.8.2.1&ty=u
Index: php-src/ext/spl/spl_sxe.c
diff -u php-src/ext/spl/spl_sxe.c:1.8 php-src/ext/spl/spl_sxe.c:1.8.2.1
--- php-src/ext/spl/spl_sxe.c:1.8 Wed Aug 3 10:07:53 2005
+++ php-src/ext/spl/spl_sxe.c Sat Oct 1 11:41:35 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_sxe.c,v 1.8 2005/08/03 14:07:53 sniper Exp $ */
+/* $Id: spl_sxe.c,v 1.8.2.1 2005/10/01 15:41:35 helly Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -146,13 +146,16 @@
SPL_API PHP_MINIT_FUNCTION(spl_sxe) /* {{{ */
{
- zend_class_entry *spl_ce_SimpleXML_Element = sxe_get_element_class_entry();
-
- if (!spl_ce_SimpleXML_Element) {
+ zend_class_entry **pce, *spl_ce_SimpleXMLElement;
+
+ if (zend_hash_find(CG(class_table), "simplexmlelement",
sizeof("SimpleXMLElement"), (void **) &pce) == FAILURE) {
+ spl_ce_SimpleXMLIterator = NULL;
return SUCCESS; /* SimpleXML must be initialized before */
}
+
+ spl_ce_SimpleXMLElement = *pce;
- REGISTER_SPL_SUB_CLASS_EX(SimpleXMLIterator, SimpleXML_Element, sxe_object_new,
spl_funcs_SimpleXMLIterator);
+ REGISTER_SPL_SUB_CLASS_EX(SimpleXMLIterator, SimpleXMLElement, sxe_object_new,
spl_funcs_SimpleXMLIterator);
REGISTER_SPL_IMPLEMENTS(SimpleXMLIterator, RecursiveIterator);
return SUCCESS;
http://cvs.php.net/diff.php/php-src/ext/simplexml/config.m4?r1=1.9&r2=1.9.2.1&ty=u
Index: php-src/ext/simplexml/config.m4
diff -u php-src/ext/simplexml/config.m4:1.9 php-src/ext/simplexml/config.m4:1.9.2.1
--- php-src/ext/simplexml/config.m4:1.9 Wed Apr 27 09:12:54 2005
+++ php-src/ext/simplexml/config.m4 Sat Oct 1 11:41:37 2005
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.9 2005/04/27 13:12:54 sniper Exp $
+dnl $Id: config.m4,v 1.9.2.1 2005/10/01 15:41:37 helly Exp $
dnl config.m4 for extension simplexml
PHP_ARG_ENABLE(simplexml, whether to enable SimpleXML support,
@@ -23,4 +23,5 @@
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
])
PHP_ADD_EXTENSION_DEP(simplexml, libxml)
+ PHP_ADD_EXTENSION_DEP(simplexml, spl, true)
fi