]> granicus.if.org Git - php/commitdiff
MFH: Fixed module loading order and made request shutdown functions also to
authorJani Taskinen <jani@php.net>
Thu, 14 May 2009 18:34:27 +0000 (18:34 +0000)
committerJani Taskinen <jani@php.net>
Thu, 14 May 2009 18:34:27 +0000 (18:34 +0000)
     be loaded in reverse like all other shutdowns are.

Zend/zend.c
build/order_by_dep.awk
ext/date/config0.m4 [moved from ext/date/config.m4 with 100% similarity]
ext/date/php_date.c

index 47fb5e8c241e942424cd02d7345a510001f1e6e9..78dcfc8ece543c6b0ba0c5eb713c29ae2847b6a9 100644 (file)
@@ -835,7 +835,7 @@ void zend_deactivate_modules(TSRMLS_D)
        EG(opline_ptr) = NULL; /* we're no longer executing anything */
 
        zend_try {
-               zend_hash_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
+               zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
        } zend_end_try();
 }
 
index 38128b2e1b56a1c999b93e525ac20316b56dd70d..487d055723ec7381d12351eae0fc554826f55bf0 100644 (file)
@@ -79,8 +79,7 @@ END {
        out_count = 0;
        
        while (count(mods)) {
-               # count down, since we need to assemble it in reverse order
-               for (i = mod_count-1; i >= 0; --i) {
+               for (i = 0; i <= mod_count; i++) {
                        if (i in mods) {
                                do_deps(i);
                        }
similarity index 100%
rename from ext/date/config.m4
rename to ext/date/config0.m4
index 8e53cc0f4360152b5df559f065305f08cd8c3c4f..8618ab0abbb0f3992fb8fa1ca976ed3940b26009 100644 (file)
@@ -18,6 +18,8 @@
 
 /* $Id$ */
 
+#define _ISOC9X_SOURCE
+
 #include "php.h"
 #include "php_streams.h"
 #include "php_main.h"
@@ -316,17 +318,11 @@ static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC);
 static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC);
 static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC);
 
-/* This is need to ensure that session extension request shutdown occurs 1st, because it uses the date extension */ 
-static zend_module_dep date_deps[] = {
-        ZEND_MOD_OPTIONAL("session")
-        {NULL, NULL, NULL}
-};
-
 /* {{{ Module struct */
 zend_module_entry date_module_entry = {
        STANDARD_MODULE_HEADER_EX,
        NULL,
-       date_deps,
+       NULL,
        "date",                     /* extension name */
        date_functions,             /* function list */
        PHP_MINIT(date),            /* process startup */