diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-12-02 06:43:54 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-12-02 06:43:54 +0000 |
commit | 057e87e6e55e2e6d5604254d9b02e22d0852b40d (patch) | |
tree | 6eb57c852a5d4b4aa9d33c045572d9271b4ec73f | |
parent | a6e02dc45dd82e08f26602e5cdc0a6819aa539d6 (diff) | |
download | php-git-057e87e6e55e2e6d5604254d9b02e22d0852b40d.tar.gz |
Repositioned CoInitialize and CoUninitialize that apparetly makes it more
correct according to MS docs. Patch (+5) by Michael Sisolak
<msisolak@yahoo.com>.
-rw-r--r-- | ext/standard/basic_functions.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index dde522db33..d5fbe42742 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -966,10 +966,6 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) memset(&BG(url_adapt_state), 0, sizeof(BG(url_adapt_state))); memset(&BG(url_adapt_state_ex), 0, sizeof(BG(url_adapt_state_ex))); -#ifdef PHP_WIN32 - CoInitialize(NULL); -#endif - BG(incomplete_class) = php_create_incomplete_class(TSRMLS_C); } @@ -980,9 +976,6 @@ static void basic_globals_dtor(php_basic_globals *basic_globals_p TSRMLS_DC) if (BG(sm_allowed_env_vars)) { free(BG(sm_allowed_env_vars)); } -#ifdef PHP_WIN32 - CoUninitialize(); -#endif } @@ -1115,6 +1108,10 @@ PHP_MSHUTDOWN_FUNCTION(basic) PHP_RINIT_FUNCTION(basic) { +#ifdef PHP_WIN32 + CoInitialize(NULL); +#endif + memset(BG(strtok_table), 0, 256); BG(strtok_string) = NULL; BG(strtok_zval) = NULL; @@ -1197,6 +1194,10 @@ PHP_RSHUTDOWN_FUNCTION(basic) } #endif +#ifdef PHP_WIN32 + CoUninitialize(); +#endif + return SUCCESS; } |