]> git.pld-linux.org Git - packages/php.git/blob - spl-shared.patch
- make possible to have spl shared
[packages/php.git] / spl-shared.patch
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
3 @@ -26,7 +26,7 @@
4    CPPFLAGS=$old_CPPFLAGS
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)
11  fi
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
14 @@ -48,6 +48,10 @@
15  #include "php_smart_str.h"
16  #ifdef HAVE_SPL
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;
21 +#endif
22  #endif
23  
24  /* {{{ defines */
25 @@ -132,6 +136,15 @@
26  
27         REGISTER_LONG_CONSTANT("COUNT_NORMAL", COUNT_NORMAL, CONST_CS | CONST_PERSISTENT);
28         REGISTER_LONG_CONSTANT("COUNT_RECURSIVE", COUNT_RECURSIVE, CONST_CS | CONST_PERSISTENT);
29 +
30 +#ifdef HAVE_SPL && COMPILE_DL_SPL
31 +       /* get spl_ce_Countable via weak ref */
32 +       zend_class_entry **pce;
33 +
34 +       if (zend_hash_find(CG(class_table), "countable", sizeof("Countable"), (void **) &pce) != FAILURE) {
35 +               spl_ce_Countable = *pce;
36 +       }
37 +#endif
38         
39         return SUCCESS;
40  }
This page took 0.026527 seconds and 3 git commands to generate.