iliaa Mon Dec 2 01:43:54 2002 EDT
Modified files:
/php4/ext/standard basic_functions.c
Log:
Repositioned CoInitialize and CoUninitialize that apparetly makes it more
correct according to MS docs. Patch (+5) by Michael Sisolak
<[EMAIL PROTECTED]>.
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.544
php4/ext/standard/basic_functions.c:1.545
--- php4/ext/standard/basic_functions.c:1.544 Mon Nov 18 21:34:13 2002
+++ php4/ext/standard/basic_functions.c Mon Dec 2 01:43:54 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.544 2002/11/19 02:34:13 helly Exp $ */
+/* $Id: basic_functions.c,v 1.545 2002/12/02 06:43:54 iliaa Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -966,10 +966,6 @@
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 @@
if (BG(sm_allowed_env_vars)) {
free(BG(sm_allowed_env_vars));
}
-#ifdef PHP_WIN32
- CoUninitialize();
-#endif
}
@@ -1115,6 +1108,10 @@
PHP_RINIT_FUNCTION(basic)
{
+#ifdef PHP_WIN32
+ CoInitialize(NULL);
+#endif
+
memset(BG(strtok_table), 0, 256);
BG(strtok_string) = NULL;
BG(strtok_zval) = NULL;
@@ -1195,6 +1192,10 @@
if (BG(mmap_file)) {
munmap(BG(mmap_file), BG(mmap_len));
}
+#endif
+
+#ifdef PHP_WIN32
+ CoUninitialize();
#endif
return SUCCESS;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php