Skip to content

Commit e182aee

Browse files
committed
Fixed module numbering
1 parent 3a24a0b commit e182aee

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Zend/zend_API.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#endif
3434

3535
/* these variables are true statics/globals, and have to be mutex'ed on every access */
36-
static int module_count=0;
3736
ZEND_API HashTable module_registry;
3837

3938
/* 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) /* {{
21842183
/* return the next free module number */
21852184
int zend_next_free_module(void) /* {{{ */
21862185
{
2187-
return ++module_count;
2186+
return zend_hash_num_elements(&module_registry) + 1;
21882187
}
21892188
/* }}} */
21902189

0 commit comments

Comments
 (0)