Fixed module numbering

This commit is contained in:
Dmitry Stogov 2012-03-05 12:47:25 +00:00
parent 3a24a0b76e
commit e182aeec10

View 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;
/* this function doesn't check for too many parameters */
@ -2184,7 +2183,7 @@ int module_registry_unload_temp(const zend_module_entry *module TSRMLS_DC) /* {{
/* return the next free module number */
int zend_next_free_module(void) /* {{{ */
{
return ++module_count;
return zend_hash_num_elements(&module_registry) + 1;
}
/* }}} */