mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Fix a bug in the resource dispencer
This commit is contained in:
parent
b7f2d80a28
commit
ddbcbb666d
@ -327,7 +327,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||
zend_v_compile_files = v_compile_files;
|
||||
zend_execute = execute;
|
||||
|
||||
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
|
||||
zend_startup_extensions();
|
||||
|
||||
/* set up version */
|
||||
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "zend_extensions.h"
|
||||
|
||||
ZEND_API zend_llist zend_extensions;
|
||||
static int last_resource_number=0;
|
||||
static int last_resource_number;
|
||||
|
||||
int zend_load_extensions(char **extension_paths)
|
||||
{
|
||||
@ -143,6 +143,14 @@ static void zend_extension_shutdown(zend_extension *extension)
|
||||
}
|
||||
|
||||
|
||||
int zend_startup_extensions()
|
||||
{
|
||||
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
|
||||
last_resource_number = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
void zend_shutdown_extensions()
|
||||
{
|
||||
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_shutdown);
|
||||
|
@ -92,6 +92,7 @@ ZEND_API int zend_load_extension(char *path);
|
||||
ZEND_API int zend_load_extensions(char **extension_paths);
|
||||
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
|
||||
void zend_append_version_info(zend_extension *extension);
|
||||
int zend_startup_extensions(void);
|
||||
void zend_shutdown_extensions(void);
|
||||
|
||||
#endif /* _ZEND_EXTENSIONS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user