mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix a bug in the resource dispencer
This commit is contained in:
parent
b7f2d80a28
commit
ddbcbb666d
3 changed files with 11 additions and 2 deletions
|
@ -327,7 +327,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
|
||||||
zend_v_compile_files = v_compile_files;
|
zend_v_compile_files = v_compile_files;
|
||||||
zend_execute = execute;
|
zend_execute = execute;
|
||||||
|
|
||||||
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
|
zend_startup_extensions();
|
||||||
|
|
||||||
/* set up version */
|
/* set up version */
|
||||||
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
|
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "zend_extensions.h"
|
#include "zend_extensions.h"
|
||||||
|
|
||||||
ZEND_API zend_llist zend_extensions;
|
ZEND_API zend_llist zend_extensions;
|
||||||
static int last_resource_number=0;
|
static int last_resource_number;
|
||||||
|
|
||||||
int zend_load_extensions(char **extension_paths)
|
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()
|
void zend_shutdown_extensions()
|
||||||
{
|
{
|
||||||
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_shutdown);
|
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_load_extensions(char **extension_paths);
|
||||||
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
|
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
|
||||||
void zend_append_version_info(zend_extension *extension);
|
void zend_append_version_info(zend_extension *extension);
|
||||||
|
int zend_startup_extensions(void);
|
||||||
void zend_shutdown_extensions(void);
|
void zend_shutdown_extensions(void);
|
||||||
|
|
||||||
#endif /* _ZEND_EXTENSIONS_H */
|
#endif /* _ZEND_EXTENSIONS_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue