]> granicus.if.org Git - php/commitdiff
Fixed module numbering
authorDmitry Stogov <dmitry@php.net>
Mon, 5 Mar 2012 12:47:25 +0000 (12:47 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 5 Mar 2012 12:47:25 +0000 (12:47 +0000)
Zend/zend_API.c

index 1c608a7a30e4bba1b5c0a8f7f92e85d03b678ede..71feccf9fffe41b3a40b85e0c4b5cb557e1ffe0d 100644 (file)
@@ -33,7 +33,6 @@
 #endif
 
 /* these variables are true statics/globals, and have to be mutex'ed on every access */
-static int module_count=0;
 ZEND_API HashTable module_registry;
 
 static zend_module_entry **module_request_startup_handlers;
@@ -2381,7 +2380,7 @@ void zend_post_deactivate_modules(TSRMLS_D) /* {{{ */
 /* return the next free module number */
 int zend_next_free_module(void) /* {{{ */
 {
-       return ++module_count;
+       return zend_hash_num_elements(&module_registry) + 1;
 }
 /* }}} */