diff options
author | Sam Ruby <rubys@php.net> | 1999-12-07 20:49:01 +0000 |
---|---|---|
committer | Sam Ruby <rubys@php.net> | 1999-12-07 20:49:01 +0000 |
commit | 8abf7246780903b2b3084948dbe83e3b967d84bb (patch) | |
tree | a5e1168d097a3fb52b9e77b2f90e9fc2242aa28f /main/internal_functions_win32.c | |
parent | 6068b5bdacc76296299ea9a3c9fa63049780d961 (diff) | |
download | php-git-8abf7246780903b2b3084948dbe83e3b967d84bb.tar.gz |
Provide basis for shared libraries/dlls to contain internal extensions
Diffstat (limited to 'main/internal_functions_win32.c')
-rw-r--r-- | main/internal_functions_win32.c | 49 |
1 files changed, 10 insertions, 39 deletions
diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c index c93de106b5..b4666e8703 100644 --- a/main/internal_functions_win32.c +++ b/main/internal_functions_win32.c @@ -22,6 +22,7 @@ #include "php.h" +#include "main.h" #include "modules.h" #include "internal_functions_registry.h" #include "zend_compile.h" @@ -62,7 +63,7 @@ unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW }; unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; unsigned char second_arg_allow_ref[] = { 2, BYREF_NONE, BYREF_ALLOW }; -zend_module_entry *php3_builtin_modules[] = { +zend_module_entry *php_builtin_extensions[] = { phpext_dl_ptr, phpext_file_ptr, phpext_fsock_ptr, @@ -89,52 +90,22 @@ zend_module_entry *php3_builtin_modules[] = { phpext_assert_ptr }; +#define EXTCOUNT (sizeof(php_builtin_extensions)/sizeof(zend_module_entry *)) + -int module_startup_modules(void) +int php_startup_internal_extensions(void) { - zend_module_entry **ptr = php3_builtin_modules, **end = ptr+(sizeof(php3_builtin_modules)/sizeof(zend_module_entry *)); - - while (ptr < end) { - if (*ptr) { - if (zend_startup_module(*ptr)==FAILURE) { - return FAILURE; - } - } - ptr++; - } - return SUCCESS; + return php_startup_extensions(php_builtin_extensions, EXTCOUNT); } -int module_global_startup_modules(void) +int php_global_startup_internal_extensions(void) { - zend_module_entry **ptr = php3_builtin_modules, **end = ptr+(sizeof(php3_builtin_modules)/sizeof(zend_module_entry *)); - - while (ptr < end) { - if (*ptr) { - if ((*ptr)->global_startup_func && - (*ptr)->global_startup_func()==FAILURE) { - return FAILURE; - } - } - ptr++; - } - return SUCCESS; + return php_global_startup_extensions(php_builtin_extensions, EXTCOUNT); } -int module_global_shutdown_modules(void) +int php_global_shutdown_internal_extensions(void) { - zend_module_entry **ptr = php3_builtin_modules, **end = ptr+(sizeof(php3_builtin_modules)/sizeof(zend_module_entry *)); - - while (ptr < end) { - if (*ptr) { - if ((*ptr)->global_shutdown_func && - (*ptr)->global_shutdown_func()==FAILURE) { - return FAILURE; - } - } - ptr++; - } - return SUCCESS; + return php_global_shutdown_extensions(php_builtin_extensions, EXTCOUNT); } |