1 --- php-5.2.11/ext/spl/config.m4~ 2006-12-04 20:01:53.000000000 +0200
2 +++ php-5.2.11/ext/spl/config.m4 2009-09-23 16:07:37.775732678 +0300
5 AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed])
6 AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support])
7 - PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c, no)
8 + PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c, $ext_shared)
9 PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_sxe.h])
10 PHP_ADD_EXTENSION_DEP(spl, pcre, true)
12 --- php-5.2.11/ext/standard/array.c 2009-09-23 16:37:08.248891644 +0300
13 +++ php-5.2.11/ext/standard/array.c 2009-09-23 16:58:07.478775818 +0300
15 #include "php_smart_str.h"
17 #include "ext/spl/spl_array.h"
18 +#ifdef COMPILE_DL_SPL
19 +#define spl_ce_Countable spl_ce_Countable_p
20 +zend_class_entry *spl_ce_Countable_p = NULL;
27 REGISTER_LONG_CONSTANT("COUNT_NORMAL", COUNT_NORMAL, CONST_CS | CONST_PERSISTENT);
28 REGISTER_LONG_CONSTANT("COUNT_RECURSIVE", COUNT_RECURSIVE, CONST_CS | CONST_PERSISTENT);
30 +#ifdef HAVE_SPL && COMPILE_DL_SPL
31 + /* get spl_ce_Countable via weak ref */
32 + zend_class_entry **pce;
34 + if (zend_hash_find(CG(class_table), "countable", sizeof("Countable"), (void **) &pce) != FAILURE) {
35 + spl_ce_Countable = *pce;