diff options
Diffstat (limited to 'ext/com_dotnet/com_extension.c')
| -rw-r--r-- | ext/com_dotnet/com_extension.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c index 6e8a82803..c043d53f9 100644 --- a/ext/com_dotnet/com_extension.c +++ b/ext/com_dotnet/com_extension.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_extension.c,v 1.17.2.2 2006/01/01 12:50:00 sniper Exp $ */ +/* $Id: com_extension.c,v 1.17.2.2.2.4 2006/10/18 23:47:33 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -30,6 +30,8 @@ #include "Zend/zend_exceptions.h" ZEND_DECLARE_MODULE_GLOBALS(com_dotnet) +static PHP_GINIT_FUNCTION(com_dotnet); + TsHashTable php_com_typelibraries; zend_class_entry @@ -86,7 +88,11 @@ zend_module_entry com_dotnet_module_entry = { PHP_RSHUTDOWN(com_dotnet), PHP_MINFO(com_dotnet), "0.1", - STANDARD_MODULE_PROPERTIES + PHP_MODULE_GLOBALS(com_dotnet), + PHP_GINIT(com_dotnet), + NULL, + NULL, + STANDARD_MODULE_PROPERTIES_EX }; /* }}} */ @@ -109,7 +115,7 @@ static PHP_INI_MH(OnTypeLibFileUpdate) char *strtok_buf = NULL; int cached; - if (!new_value || (typelib_file = VCWD_FOPEN(new_value, "r"))==NULL) { + if (!new_value || !new_value[0] || (typelib_file = VCWD_FOPEN(new_value, "r"))==NULL) { return FAILURE; } @@ -170,9 +176,9 @@ PHP_INI_BEGIN() PHP_INI_END() /* }}} */ -/* {{{ php_com_dotnet_init_globals +/* {{{ PHP_GINIT_FUNCTION */ -static void php_com_dotnet_init_globals(zend_com_dotnet_globals *com_dotnet_globals) +static PHP_GINIT_FUNCTION(com_dotnet) { memset(com_dotnet_globals, 0, sizeof(*com_dotnet_globals)); com_dotnet_globals->code_page = CP_ACP; @@ -185,14 +191,11 @@ PHP_MINIT_FUNCTION(com_dotnet) { zend_class_entry ce, *tmp; - ZEND_INIT_MODULE_GLOBALS(com_dotnet, php_com_dotnet_init_globals, NULL); - REGISTER_INI_ENTRIES(); - php_com_wrapper_minit(INIT_FUNC_ARGS_PASSTHRU); php_com_persist_minit(INIT_FUNC_ARGS_PASSTHRU); INIT_CLASS_ENTRY(ce, "com_exception", NULL); - php_com_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC); + php_com_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); php_com_exception_class_entry->ce_flags |= ZEND_ACC_FINAL; /* php_com_exception_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED; */ @@ -221,6 +224,8 @@ PHP_MINIT_FUNCTION(com_dotnet) tmp->get_iterator = php_com_iter_get; #endif + REGISTER_INI_ENTRIES(); + #define COM_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS|CONST_PERSISTENT) COM_CONST(CLSCTX_INPROC_SERVER); |
