diff options
72 files changed, 211 insertions, 223 deletions
diff --git a/ext/aspell/php_aspell.h b/ext/aspell/php_aspell.h index 09541eb832..3047c99a3f 100644 --- a/ext/aspell/php_aspell.h +++ b/ext/aspell/php_aspell.h @@ -24,8 +24,8 @@ extern zend_module_entry aspell_module_entry; #define aspell_module_ptr &aspell_module_entry -extern PHP_MINIT_FUNCTION(aspell); -extern PHP_MINFO_FUNCTION(aspell); +PHP_MINIT_FUNCTION(aspell); +PHP_MINFO_FUNCTION(aspell); PHP_FUNCTION(aspell_new); PHP_FUNCTION(aspell_check); diff --git a/ext/com/COM.c b/ext/com/COM.c index 93762ccd02..51d953c9c4 100644 --- a/ext/com/COM.c +++ b/ext/com/COM.c @@ -1686,14 +1686,16 @@ PHP_FUNCTION(com_isenum) } /* }}} */ -void php_register_COM_class() +void php_register_COM_class(void) { + TSRMLS_FETCH(); + INIT_OVERLOADED_CLASS_ENTRY(com_class_entry, "COM", NULL, php_COM_call_function_handler, php_COM_get_property_handler, php_COM_set_property_handler); - zend_register_internal_class(&com_class_entry); + zend_register_internal_class(&com_class_entry TSRMLS_CC); } PHP_MINIT_FUNCTION(COM) diff --git a/ext/com/VARIANT.c b/ext/com/VARIANT.c index 9eaca8d23b..cc79171167 100644 --- a/ext/com/VARIANT.c +++ b/ext/com/VARIANT.c @@ -426,14 +426,16 @@ static void php_variant_destructor(zend_rsrc_list_entry *rsrc) efree(rsrc); } -void php_register_VARIANT_class() +void php_register_VARIANT_class(void) { + TSRMLS_FETCH(); + INIT_OVERLOADED_CLASS_ENTRY(VARIANT_class_entry, "VARIANT", NULL, php_VARIANT_call_function_handler, php_VARIANT_get_property_handler, php_VARIANT_set_property_handler); - zend_register_internal_class(&VARIANT_class_entry); + zend_register_internal_class(&VARIANT_class_entry TSRMLS_CC); } #endif /* PHP_WIN32 */ diff --git a/ext/com/php_COM.h b/ext/com/php_COM.h index f4c0c6a079..3a2108f415 100644 --- a/ext/com/php_COM.h +++ b/ext/com/php_COM.h @@ -7,25 +7,25 @@ BEGIN_EXTERN_C() -extern PHP_MINIT_FUNCTION(COM); -extern PHP_MSHUTDOWN_FUNCTION(COM); +PHP_MINIT_FUNCTION(COM); +PHP_MSHUTDOWN_FUNCTION(COM); -extern PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult); -extern PHPAPI HRESULT php_COM_get_ids_of_names(comval *obj, OLECHAR FAR* FAR* rgszNames, DISPID FAR* rgDispId); -extern PHPAPI HRESULT php_COM_release(comval *obj); -extern PHPAPI HRESULT php_COM_addref(comval *obj); -extern PHPAPI HRESULT php_COM_set(comval *obj, IDispatch FAR* pDisp, int cleanup); -extern PHPAPI HRESULT php_COM_clone(comval *obj, comval *clone, int cleanup); +PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult); +PHPAPI HRESULT php_COM_get_ids_of_names(comval *obj, OLECHAR FAR* FAR* rgszNames, DISPID FAR* rgDispId); +PHPAPI HRESULT php_COM_release(comval *obj); +PHPAPI HRESULT php_COM_addref(comval *obj); +PHPAPI HRESULT php_COM_set(comval *obj, IDispatch FAR* pDisp, int cleanup); +PHPAPI HRESULT php_COM_clone(comval *obj, comval *clone, int cleanup); -extern int php_COM_get_le_comval(); +int php_COM_get_le_comval(); -extern zend_module_entry COM_module_entry; -extern zend_class_entry com_class_entry; +zend_module_entry COM_module_entry; +zend_class_entry com_class_entry; -extern pval php_COM_get_property_handler(zend_property_reference *property_reference); -extern int php_COM_set_property_handler(zend_property_reference *property_reference, pval *value); -extern char *php_COM_error_message(HRESULT hr); -extern void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference); +pval php_COM_get_property_handler(zend_property_reference *property_reference); +int php_COM_set_property_handler(zend_property_reference *property_reference, pval *value); +char *php_COM_error_message(HRESULT hr); +void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference); #ifdef DEBUG extern int resourcecounter; diff --git a/ext/com/php_VARIANT.h b/ext/com/php_VARIANT.h index 47acd13625..5e6d51f821 100644 --- a/ext/com/php_VARIANT.h +++ b/ext/com/php_VARIANT.h @@ -7,8 +7,8 @@ extern int php_VARIANT_get_le_variant(); -extern PHP_MINIT_FUNCTION(VARIANT); -extern PHP_MSHUTDOWN_FUNCTION(VARIANT); +PHP_MINIT_FUNCTION(VARIANT); +PHP_MSHUTDOWN_FUNCTION(VARIANT); extern zend_module_entry VARIANT_module_entry; diff --git a/ext/cpdf/php_cpdf.h b/ext/cpdf/php_cpdf.h index d9457b9675..6bc6288248 100644 --- a/ext/cpdf/php_cpdf.h +++ b/ext/cpdf/php_cpdf.h @@ -34,10 +34,10 @@ extern zend_module_entry cpdf_module_entry; #define cpdf_module_ptr &cpdf_module_entry -extern PHP_MINFO_FUNCTION(cpdf); -extern PHP_MINIT_FUNCTION(cpdf); -extern PHP_RINIT_FUNCTION(cpdf); -extern PHP_MSHUTDOWN_FUNCTION(cpdf); +PHP_MINFO_FUNCTION(cpdf); +PHP_MINIT_FUNCTION(cpdf); +PHP_RINIT_FUNCTION(cpdf); +PHP_MSHUTDOWN_FUNCTION(cpdf); PHP_FUNCTION(cpdf_global_set_document_limits); PHP_FUNCTION(cpdf_set_creator); PHP_FUNCTION(cpdf_set_title); diff --git a/ext/dbase/php_dbase.h b/ext/dbase/php_dbase.h index c01511db77..18d0873277 100644 --- a/ext/dbase/php_dbase.h +++ b/ext/dbase/php_dbase.h @@ -24,7 +24,7 @@ extern zend_module_entry dbase_module_entry; #define dbase_module_ptr &dbase_module_entry -extern PHP_MINIT_FUNCTION(dbase); +PHP_MINIT_FUNCTION(dbase); PHP_FUNCTION(dbase_open); PHP_FUNCTION(dbase_create); PHP_FUNCTION(dbase_close); diff --git a/ext/dbplus/dbplus.c b/ext/dbplus/dbplus.c index 48fad7bd40..1768108e5f 100644 --- a/ext/dbplus/dbplus.c +++ b/ext/dbplus/dbplus.c @@ -134,10 +134,6 @@ PHP_INI_END() PHP_MINIT_FUNCTION(dbplus) { -/* Remove comments if you have entries in php.ini - REGISTER_INI_ENTRIES(); -*/ - /* resource id for cdb connections */ le_dbplus_relation = zend_register_list_destructors_ex(dbplus_destruct_relation, NULL, "dbplus_relation", module_number); le_dbplus_tupel = zend_register_list_destructors_ex(dbplus_destruct_tupel , NULL, "dbplus_tuple" , module_number); diff --git a/ext/dbx/dbx.c b/ext/dbx/dbx.c index 1e54ad0689..f4ec5c39a4 100644 --- a/ext/dbx/dbx.c +++ b/ext/dbx/dbx.c @@ -469,8 +469,11 @@ ZEND_FUNCTION(dbx_query) zend_hash_index_find((*inforow_ptr)->value.ht, col_index, (void **) &columnname_ptr); zend_hash_index_find((*row_ptr)->value.ht, col_index, (void **) &actual_ptr); (*actual_ptr)->refcount+=1; + (*actual_ptr)->is_ref=1; + zend_hash_update((*row_ptr)->value.ht, (*columnname_ptr)->value.str.val, (*columnname_ptr)->value.str.len + 1, actual_ptr, sizeof(zval *), NULL); + } } ++row_count; diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index f6b525d06b..a13bd0d7f0 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -721,6 +721,7 @@ PHP_RINIT_FUNCTION(domxml) PHP_MINIT_FUNCTION(domxml) { zend_class_entry ce; + le_domxmldocp = zend_register_list_destructors_ex(php_free_xml_doc, NULL, "domdocument", module_number); /* Freeing the document contains freeing the complete tree. Therefore nodes, attributes etc. may not be freed seperately. @@ -736,53 +737,53 @@ PHP_MINIT_FUNCTION(domxml) /* le_domxmlnsp = register_list_destructors(NULL, NULL); */ INIT_OVERLOADED_CLASS_ENTRY(ce, "DomNode", php_domxmlnode_class_functions, NULL, NULL, NULL); - domxmlnode_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL); + domxmlnode_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomDocument", php_domxmldoc_class_functions, NULL, NULL, NULL); - domxmldoc_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmldoc_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomDocumentType", php_domxmldoctype_class_functions, NULL, NULL, NULL); - domxmldoctype_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmldoctype_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "Dtd", php_domxmldtd_class_functions, NULL, NULL, NULL); - domxmldtd_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmldtd_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomElement", php_domxmlelement_class_functions, NULL, NULL, NULL); - domxmlelement_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmlelement_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomAttribute", php_domxmlattr_class_functions, NULL, NULL, NULL); - domxmlattr_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmlattr_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomCData", php_domxmlcdata_class_functions, NULL, NULL, NULL); - domxmlcdata_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmlcdata_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomText", php_domxmltext_class_functions, NULL, NULL, NULL); - domxmltext_class_entry = zend_register_internal_class_ex(&ce, domxmlcdata_class_entry, NULL); + domxmltext_class_entry = zend_register_internal_class_ex(&ce, domxmlcdata_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomComment", php_domxmlcomment_class_functions, NULL, NULL, NULL); - domxmlcomment_class_entry = zend_register_internal_class_ex(&ce, domxmlcdata_class_entry, NULL); + domxmlcomment_class_entry = zend_register_internal_class_ex(&ce, domxmlcdata_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomProcessingInstruction", php_domxmlpi_class_functions, NULL, NULL, NULL); - domxmlpi_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmlpi_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomNotation", php_domxmlnotation_class_functions, NULL, NULL, NULL); - domxmlnotation_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmlnotation_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomEntity", php_domxmlentity_class_functions, NULL, NULL, NULL); - domxmlentity_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmlentity_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomEntityReference", php_domxmlentityref_class_functions, NULL, NULL, NULL); - domxmlentityref_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL); + domxmlentityref_class_entry = zend_register_internal_class_ex(&ce, domxmlnode_class_entry, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "DomNamespace", php_domxmlns_class_functions, NULL, NULL, NULL); - domxmlns_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL); + domxmlns_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); #if defined(LIBXML_XPATH_ENABLED) INIT_OVERLOADED_CLASS_ENTRY(ce, "XPathContext", php_xpathctx_class_functions, NULL, NULL, NULL); - xpathctx_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL); + xpathctx_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); INIT_OVERLOADED_CLASS_ENTRY(ce, "XPathObject", php_xpathobject_class_functions, NULL, NULL, NULL); - xpathobject_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL); + xpathobject_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); #endif REGISTER_LONG_CONSTANT("XML_ELEMENT_NODE", XML_ELEMENT_NODE, CONST_CS | CONST_PERSISTENT); diff --git a/ext/domxml/php_domxml.h b/ext/domxml/php_domxml.h index d318230919..6c7fcc26ed 100644 --- a/ext/domxml/php_domxml.h +++ b/ext/domxml/php_domxml.h @@ -34,9 +34,9 @@ extern zend_module_entry domxml_module_entry; #define domxml_module_ptr &domxml_module_entry /* directory functions */ -extern PHP_MINIT_FUNCTION(domxml); -extern PHP_RINIT_FUNCTION(domxml); -extern PHP_MINFO_FUNCTION(domxml); +PHP_MINIT_FUNCTION(domxml); +PHP_RINIT_FUNCTION(domxml); +PHP_MINFO_FUNCTION(domxml); PHP_FUNCTION(domxml_version); PHP_FUNCTION(xmldoc); PHP_FUNCTION(xmldocfile); diff --git a/ext/dotnet/dotnet.cpp b/ext/dotnet/dotnet.cpp index b6d84a0839..0407150e99 100644 --- a/ext/dotnet/dotnet.cpp +++ b/ext/dotnet/dotnet.cpp @@ -184,14 +184,16 @@ void php_DOTNET_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_propert } } -void php_register_DOTNET_class() +void php_register_DOTNET_class(void) { + TSRMLS_FETCH(); + INIT_OVERLOADED_CLASS_ENTRY(dotnet_class_entry, "DOTNET", NULL, php_DOTNET_call_function_handler, php_COM_get_property_handler, php_COM_set_property_handler); - zend_register_internal_class(&dotnet_class_entry); + zend_register_internal_class(&dotnet_class_entry TSRMLS_CC); } function_entry DOTNET_functions[] = { @@ -207,7 +209,6 @@ static PHP_MINFO_FUNCTION(DOTNET) PHP_MINIT_FUNCTION(DOTNET) { - HRESULT hr; CoInitialize(0); hr = dotnet_init(); diff --git a/ext/dotnet/php_dotnet.h b/ext/dotnet/php_dotnet.h index 570f4bdc7f..b56af145e2 100644 --- a/ext/dotnet/php_dotnet.h +++ b/ext/dotnet/php_dotnet.h @@ -3,8 +3,8 @@ #if WIN32|WINNT -extern PHP_MINIT_FUNCTION(DOTNET); -extern PHP_MSHUTDOWN_FUNCTION(DOTNET); +PHP_MINIT_FUNCTION(DOTNET); +PHP_MSHUTDOWN_FUNCTION(DOTNET); PHP_FUNCTION(DOTNET_load); extern zend_module_entry DOTNET_module_entry; diff --git a/ext/fbsql/php_fbsql.h b/ext/fbsql/php_fbsql.h index 064ce5d954..9aa0894cf5 100644 --- a/ext/fbsql/php_fbsql.h +++ b/ext/fbsql/php_fbsql.h @@ -34,10 +34,10 @@ extern zend_module_entry fbsql_module_entry; #include <FBCAccess/FBCAccess.h> -extern PHP_MINIT_FUNCTION(fbsql); -extern PHP_MSHUTDOWN_FUNCTION(fbsql); -extern PHP_RINIT_FUNCTION(fbsql); -extern PHP_RSHUTDOWN_FUNCTION(fbsql); +PHP_MINIT_FUNCTION(fbsql); +PHP_MSHUTDOWN_FUNCTION(fbsql); +PHP_RINIT_FUNCTION(fbsql); +PHP_RSHUTDOWN_FUNCTION(fbsql); PHP_MINFO_FUNCTION(fbsql); PHP_FUNCTION(fbsql_connect); PHP_FUNCTION(fbsql_pconnect); diff --git a/ext/filepro/php_filepro.h b/ext/filepro/php_filepro.h index 8c5b8f4973..f060fc277b 100644 --- a/ext/filepro/php_filepro.h +++ b/ext/filepro/php_filepro.h @@ -40,8 +40,8 @@ PHP_FUNCTION(filepro_fieldwidth); PHP_FUNCTION(filepro_fieldcount); PHP_FUNCTION(filepro_retrieve); -extern PHP_MINIT_FUNCTION(filepro); -extern PHP_MSHUTDOWN_FUNCTION(filepro); +PHP_MINIT_FUNCTION(filepro); +PHP_MSHUTDOWN_FUNCTION(filepro); #else #define phpext_filepro_ptr NULL #endif diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index 25c27412f9..f29695831b 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -62,8 +62,8 @@ extern zend_module_entry gd_module_entry; /* gd.c functions */ PHP_MINFO_FUNCTION(gd); -extern PHP_MINIT_FUNCTION(gd); -extern PHP_MSHUTDOWN_FUNCTION(gd); +PHP_MINIT_FUNCTION(gd); +PHP_MSHUTDOWN_FUNCTION(gd); #ifndef HAVE_GDIMAGECOLORRESOLVE static int gdImageColorResolve(gdImagePtr, int, int, int); diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index aaed49bad1..a5dc03b140 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -137,9 +137,6 @@ static void gmp_efree(void *ptr, size_t size) */ ZEND_MINIT_FUNCTION(gmp) { -/* Remove comments if you have entries in php.ini - REGISTER_INI_ENTRIES(); -*/ le_gmp = zend_register_list_destructors_ex(_php_gmpnum_free, NULL, GMP_RESOURCE_NAME, module_number); diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index 42e30a7ea7..16903522af 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -211,7 +211,8 @@ PHP_INI_BEGIN() PHP_INI_ENTRY("hyperwave.default_port", "418", PHP_INI_ALL, OnHyperwavePort) PHP_INI_END() -PHP_MINIT_FUNCTION(hw) { +PHP_MINIT_FUNCTION(hw) +{ ZEND_INIT_MODULE_GLOBALS(hw, php_hw_init_globals, NULL); REGISTER_INI_ENTRIES(); diff --git a/ext/hyperwave/php_hyperwave.h b/ext/hyperwave/php_hyperwave.h index 1ae69f4b55..c56f3c22d1 100644 --- a/ext/hyperwave/php_hyperwave.h +++ b/ext/hyperwave/php_hyperwave.h @@ -65,8 +65,8 @@ typedef struct { char *bodytag; } hw_document; -extern PHP_MINIT_FUNCTION(hw); -extern PHP_MSHUTDOWN_FUNCTION(hw); +PHP_MINIT_FUNCTION(hw); +PHP_MSHUTDOWN_FUNCTION(hw); PHP_MINFO_FUNCTION(hw); PHP_FUNCTION(hw_connect); diff --git a/ext/icap/php_icap.c b/ext/icap/php_icap.c index d0fa13cf16..7856ad6b89 100644 --- a/ext/icap/php_icap.c +++ b/ext/icap/php_icap.c @@ -130,9 +130,7 @@ PHP_MINFO_FUNCTION(icap) PHP_MINIT_FUNCTION(icap) { - le_icap = zend_register_list_destructors_ex(cal_close_it, NULL, "icap", module_number); - return SUCCESS; } diff --git a/ext/icap/php_icap.h b/ext/icap/php_icap.h index 2370f3d270..196dbc02a1 100644 --- a/ext/icap/php_icap.h +++ b/ext/icap/php_icap.h @@ -9,7 +9,7 @@ #include "build-defs.h" #endif -extern PHP_MINIT_FUNCTION(icap); +PHP_MINIT_FUNCTION(icap); PHP_MINFO_FUNCTION(icap); /* Functions accessable to PHP */ diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index b443bd9fa4..fc603f253d 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -494,8 +494,6 @@ static void php_ibase_init_globals(TSRMLS_D) PHP_MINIT_FUNCTION(ibase) { - TSRMLS_FETCH(); - ZEND_INIT_MODULE_GLOBALS(ibase, php_ibase_init_globals, NULL); REGISTER_INI_ENTRIES(); diff --git a/ext/interbase/php_interbase.h b/ext/interbase/php_interbase.h index d7d4b55817..2200c574c5 100644 --- a/ext/interbase/php_interbase.h +++ b/ext/interbase/php_interbase.h @@ -34,10 +34,10 @@ extern zend_module_entry ibase_module_entry; #define PHP_IBASE_API #endif -extern PHP_MINIT_FUNCTION(ibase); -extern PHP_RINIT_FUNCTION(ibase); -extern PHP_MSHUTDOWN_FUNCTION(ibase); -extern PHP_RSHUTDOWN_FUNCTION(ibase); +PHP_MINIT_FUNCTION(ibase); +PHP_RINIT_FUNCTION(ibase); +PHP_MSHUTDOWN_FUNCTION(ibase); +PHP_RSHUTDOWN_FUNCTION(ibase); PHP_MINFO_FUNCTION(ibase); PHP_FUNCTION(ibase_connect); diff --git a/ext/java/java.c b/ext/java/java.c index 955d1882d4..61af18ff35 100644 --- a/ext/java/java.c +++ b/ext/java/java.c @@ -604,13 +604,14 @@ static void alloc_java_globals_ctor(php_java_globals *java_globals TSRMLS_DC) { } #endif -PHP_MINIT_FUNCTION(java) { +PHP_MINIT_FUNCTION(java) +{ INIT_OVERLOADED_CLASS_ENTRY(java_class_entry, "java", NULL, java_call_function_handler, java_get_property_handler, java_set_property_handler); - zend_register_internal_class(&java_class_entry); + zend_register_internal_class(&java_class_entry TSRMLS_CC); le_jobject = zend_register_list_destructors_ex(_php_java_destructor, NULL, "java", module_number); diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index 1c72b2d255..fe6178daa0 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -58,10 +58,10 @@ extern zend_module_entry mbstring_module_entry; #define mbstring_module_ptr &mbstring_module_entry -extern PHP_MINIT_FUNCTION(mbstring); -extern PHP_MSHUTDOWN_FUNCTION(mbstring); -extern PHP_RINIT_FUNCTION(mbstring); -extern PHP_RSHUTDOWN_FUNCTION(mbstring); +PHP_MINIT_FUNCTION(mbstring); +PHP_MSHUTDOWN_FUNCTION(mbstring); +PHP_RINIT_FUNCTION(mbstring); +PHP_RSHUTDOWN_FUNCTION(mbstring); PHP_MINFO_FUNCTION(mbstring); /* php function registration */ diff --git a/ext/mcal/php_mcal.h b/ext/mcal/php_mcal.h index 902c25dcc2..fb4d24af48 100644 --- a/ext/mcal/php_mcal.h +++ b/ext/mcal/php_mcal.h @@ -16,11 +16,11 @@ extern zend_module_entry php_mcal_module_entry; #define phpext_mcal_ptr php_mcal_module_ptr #ifdef ZEND_VERSION -extern PHP_MINIT_FUNCTION(mcal); +PHP_MINIT_FUNCTION(mcal); PHP_MINFO_FUNCTION(mcal); #else -extern int PHP_MINIT_FUNCTION(INIT_FUNC_ARGS); -extern void PHP_MINFO_FUNCTION(void); +int PHP_MINIT_FUNCTION(INIT_FUNC_ARGS); +void PHP_MINFO_FUNCTION(void); #endif diff --git a/ext/ming/ming.c b/ext/ming/ming.c index bcd2e2d540..6b4558b761 100644 --- a/ext/ming/ming.c +++ b/ext/ming/ming.c @@ -3015,19 +3015,19 @@ PHP_MINIT_FUNCTION(ming) INIT_CLASS_ENTRY(morph_class_entry, "swfmorph", swfmorph_functions); INIT_CLASS_ENTRY(sprite_class_entry, "swfsprite", swfsprite_functions); - zend_register_internal_class(&shape_class_entry); - zend_register_internal_class(&fill_class_entry); - zend_register_internal_class(&gradient_class_entry); - zend_register_internal_class(&bitmap_class_entry); - zend_register_internal_class(&text_class_entry); - zend_register_internal_class(&textfield_class_entry); - zend_register_internal_class(&font_class_entry); - zend_register_internal_class(&displayitem_class_entry); - zend_register_internal_class(&movie_class_entry); - zend_register_internal_class(&button_class_entry); - zend_register_internal_class(&action_class_entry); - zend_register_internal_class(&morph_class_entry); - zend_register_internal_class(&sprite_class_entry); + zend_register_internal_class(&shape_class_entry TSRMLS_CC); + zend_register_internal_class(&fill_class_entry TSRMLS_CC); + zend_register_internal_class(&gradient_class_entry TSRMLS_CC); + zend_register_internal_class(&bitmap_class_entry TSRMLS_CC); + zend_register_internal_class(&text_class_entry TSRMLS_CC); + zend_register_internal_class(&textfield_class_entry TSRMLS_CC); + zend_register_internal_class(&font_class_entry TSRMLS_CC); + zend_register_internal_class(&displayitem_class_entry TSRMLS_CC); + zend_register_internal_class(&movie_class_entry TSRMLS_CC); + zend_register_internal_class(&button_class_entry TSRMLS_CC); + zend_register_internal_class(&action_class_entry TSRMLS_CC); + zend_register_internal_class(&morph_class_entry TSRMLS_CC); + zend_register_internal_class(&sprite_class_entry TSRMLS_CC); return SUCCESS; } diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 4a304d606f..608c69ab1e 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -232,7 +232,7 @@ static void _close_mssql_link(zend_rsrc_list_entry *rsrc) TSRMLS_FETCH(); mssql_ptr->valid = 0; - zend_hash_apply(&EG(regular_list),(int (*)(void *))_clean_invalid_results); + zend_hash_apply(&EG(regular_list),(apply_func_t) _clean_invalid_results); dbclose(mssql_ptr->link); dbfreelogin(mssql_ptr->login); efree(mssql_ptr); diff --git a/ext/mssql/php_mssql.h b/ext/mssql/php_mssql.h index 85572c4099..2d7d90d915 100644 --- a/ext/mssql/php_mssql.h +++ b/ext/mssql/php_mssql.h @@ -50,10 +50,10 @@ extern zend_module_entry mssql_module_entry; #define mssql_module_ptr &mssql_module_entry -extern PHP_MINIT_FUNCTION(mssql); -extern PHP_MSHUTDOWN_FUNCTION(mssql); -extern PHP_RINIT_FUNCTION(mssql); -extern PHP_RSHUTDOWN_FUNCTION(mssql); +PHP_MINIT_FUNCTION(mssql); +PHP_MSHUTDOWN_FUNCTION(mssql); +PHP_RINIT_FUNCTION(mssql); +PHP_RSHUTDOWN_FUNCTION(mssql); PHP_MINFO_FUNCTION(mssql); PHP_FUNCTION(mssql_connect); diff --git a/ext/mysql/php_mysql.h b/ext/mysql/php_mysql.h index a3c701077e..ff091aa2af 100644 --- a/ext/mysql/php_mysql.h +++ b/ext/mysql/php_mysql.h @@ -38,10 +38,10 @@ extern zend_module_entry mysql_module_entry; #define mysql_module_ptr &mysql_module_entry -extern PHP_MINIT_FUNCTION(mysql); -extern PHP_RINIT_FUNCTION(mysql); -extern PHP_MSHUTDOWN_FUNCTION(mysql); -extern PHP_RSHUTDOWN_FUNCTION(mysql); +PHP_MINIT_FUNCTION(mysql); +PHP_RINIT_FUNCTION(mysql); +PHP_MSHUTDOWN_FUNCTION(mysql); +PHP_RSHUTDOWN_FUNCTION(mysql); PHP_MINFO_FUNCTION(mysql); PHP_FUNCTION(mysql_connect); diff --git a/ext/ncurses/ncurses.c b/ext/ncurses/ncurses.c index 6126002398..34c1a767da 100644 --- a/ext/ncurses/ncurses.c +++ b/ext/ncurses/ncurses.c @@ -75,10 +75,6 @@ PHP_INI_END() */ PHP_MINIT_FUNCTION(ncurses) { -/* Remove comments if you have entries in php.ini - REGISTER_INI_ENTRIES(); -*/ - PHP_NCURSES_CONST(COLOR_BLACK); PHP_NCURSES_CONST(COLOR_RED); PHP_NCURSES_CONST(COLOR_GREEN); diff --git a/ext/notes/php_notes.h b/ext/notes/php_notes.h index e7412a63e8..35ff36eaa2 100644 --- a/ext/notes/php_notes.h +++ b/ext/notes/php_notes.h @@ -23,10 +23,10 @@ extern zend_module_entry notes_module_entry; #define notes_module_ptr ¬es_module_entry -extern PHP_MINIT_FUNCTION(notes); -extern PHP_MSHUTDOWN_FUNCTION(notes); -extern PHP_RINIT_FUNCTION(notes); -extern PHP_RSHUTDOWN_FUNCTION(notes); +PHP_MINIT_FUNCTION(notes); +PHP_MSHUTDOWN_FUNCTION(notes); +PHP_RINIT_FUNCTION(notes); +PHP_RSHUTDOWN_FUNCTION(notes); PHP_MINFO_FUNCTION(notes); PHP_FUNCTION(notes_create_db); diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 57f6da7ac7..c2c9ba4402 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -452,9 +452,9 @@ PHP_MINIT_FUNCTION(oci) INIT_CLASS_ENTRY(oci_coll_class_entry, "OCI-Collection", php_oci_coll_class_functions); #endif - oci_lob_class_entry_ptr = zend_register_internal_class(&oci_lob_class_entry); + oci_lob_class_entry_ptr = zend_register_internal_class(&oci_lob_class_entry TSRMLS_CC); #ifdef WITH_COLLECTIONS - oci_coll_class_entry_ptr = zend_register_internal_class(&oci_coll_class_entry); + oci_coll_class_entry_ptr = zend_register_internal_class(&oci_coll_class_entry TSRMLS_CC); #endif /* thies@thieso.net 990203 i do not think that we will need all of them - just in here for completeness for now! */ @@ -541,8 +541,8 @@ PHP_MSHUTDOWN_FUNCTION(oci) oci_debug("START php_mshutdown_oci"); - zend_hash_apply(OCI(user),(int (*)(void *))_session_pcleanup); - zend_hash_apply(OCI(server),(int (*)(void *))_server_pcleanup); + zend_hash_apply(OCI(user), (apply_func_t)_session_pcleanup); + zend_hash_apply(OCI(server), (apply_func_t)_server_pcleanup); zend_hash_destroy(OCI(user)); zend_hash_destroy(OCI(server)); @@ -564,8 +564,8 @@ PHP_RSHUTDOWN_FUNCTION(oci) #if 0 /* XXX free all statements, rollback all outstanding transactions */ - zend_hash_apply(OCI(user),(int (*)(void *))_session_cleanup); - zend_hash_apply(OCI(server),(int (*)(void *))_server_cleanup); + zend_hash_apply(OCI(user), (apply_func_t) _session_cleanup); + zend_hash_apply(OCI(server), (apply_func_t) _server_cleanup); #endif oci_debug("END php_rshutdown_oci"); @@ -1348,7 +1348,7 @@ oci_execute(oci_statement *statement, char *func,ub4 mode) we don't want to execute!!! */ if (statement->binds) { - zend_hash_apply(statement->binds, (int (*)(void *)) _oci_bind_pre_exec); + zend_hash_apply(statement->binds, (apply_func_t) _oci_bind_pre_exec); } statement->error = @@ -1363,7 +1363,7 @@ oci_execute(oci_statement *statement, char *func,ub4 mode) NULL, mode)); if (statement->binds) { - zend_hash_apply(statement->binds, (int (*)(void *)) _oci_bind_post_exec); + zend_hash_apply(statement->binds, (apply_func_t) _oci_bind_post_exec); } oci_handle_error(statement->conn, statement->error); @@ -1633,7 +1633,7 @@ oci_fetch(oci_statement *statement, ub4 nrows, char *func) oci_out_column *column; if (statement->columns) { - zend_hash_apply(statement->columns, (int (*)(void *)) _oci_column_pre_fetch); + zend_hash_apply(statement->columns, (apply_func_t) _oci_column_pre_fetch); } statement->error = @@ -2363,7 +2363,7 @@ _oci_close_server(oci_server *server) oldopen = server->is_open; server->is_open = 2; if (! OCI(shutdown)) { - zend_hash_apply(&EG(regular_list),_oci_session_cleanup); + zend_hash_apply(&EG(regular_list), _oci_session_cleanup); } server->is_open = oldopen; @@ -3919,7 +3919,7 @@ PHP_FUNCTION(ocilogoff) connection->is_open = 0; - zend_hash_apply(list,(int (*)(void *))_stmt_cleanup); + zend_hash_apply(list, (apply_func_t) _stmt_cleanup); if (zend_list_delete(connection->id) == SUCCESS) { RETURN_TRUE; diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h index 23bbde9b7b..5d597e9607 100644 --- a/ext/odbc/php_odbc.h +++ b/ext/odbc/php_odbc.h @@ -186,10 +186,10 @@ extern zend_module_entry odbc_module_entry; /* user functions */ -extern PHP_MINIT_FUNCTION(odbc); -extern PHP_MSHUTDOWN_FUNCTION(odbc); -extern PHP_RINIT_FUNCTION(odbc); -extern PHP_RSHUTDOWN_FUNCTION(odbc); +PHP_MINIT_FUNCTION(odbc); +PHP_MSHUTDOWN_FUNCTION(odbc); +PHP_RINIT_FUNCTION(odbc); +PHP_RSHUTDOWN_FUNCTION(odbc); PHP_MINFO_FUNCTION(odbc); PHP_FUNCTION(odbc_error); diff --git a/ext/odbc/php_velocis.h b/ext/odbc/php_velocis.h index 0ac48f43d5..109795255b 100644 --- a/ext/odbc/php_velocis.h +++ b/ext/odbc/php_velocis.h @@ -57,10 +57,10 @@ extern zend_module_entry velocis_module_entry; #define velocis_module_ptr &velocis_module_entry /* velocis.c functions */ -extern PHP_MINIT_FUNCTION(velocis); -extern PHP_RINIT_FUNCTION(velocis); +PHP_MINIT_FUNCTION(velocis); +PHP_RINIT_FUNCTION(velocis); PHP_MINFO_FUNCTION(velocis); -extern PHP_MSHUTDOWN_FUNCTION(velocis); +PHP_MSHUTDOWN_FUNCTION(velocis); PHP_FUNCTION(velocis_connect); PHP_FUNCTION(velocis_close); diff --git a/ext/odbc/velocis.c b/ext/odbc/velocis.c index 1491cb0239..5d47f0edb4 100644 --- a/ext/odbc/velocis.c +++ b/ext/odbc/velocis.c @@ -104,6 +104,7 @@ static void _free_velocis_result(zend_rsrc_list_entry *rsrc) PHP_MINIT_FUNCTION(velocis) { SQLAllocEnv(&henv); + if ( cfg_get_long("velocis.max_links",&php_velocis_module.max_links) == FAILURE ) { php_velocis_module.max_links = -1; } diff --git a/ext/oracle/oracle.c b/ext/oracle/oracle.c index e9e640c572..05894d0721 100644 --- a/ext/oracle/oracle.c +++ b/ext/oracle/oracle.c @@ -317,7 +317,6 @@ static void php_ora_init_globals(php_ora_globals *ora_globals_p TSRMLS_DC) */ PHP_MINIT_FUNCTION(oracle) { - #ifdef ZTS ts_allocate_id(&ora_globals_id, sizeof(php_ora_globals), (ts_allocate_ctor) php_ora_init_globals, NULL); #else diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 3cc25da008..8d7dcb7ba2 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -661,7 +661,7 @@ static int preg_do_eval(char *eval_str, int eval_str_len, char *subject, smart_str_appendl(&code, segment, walk - segment); smart_str_0(&code); - compiled_string_description = zend_make_compiled_string_description("regexp code"); + compiled_string_description = zend_make_compiled_string_description("regexp code" TSRMLS_CC); /* Run the code */ if (zend_eval_string(code.c, &retval, compiled_string_description TSRMLS_CC) == FAILURE) { efree(compiled_string_description); diff --git a/ext/pdf/php_pdf.h b/ext/pdf/php_pdf.h index d1dfb5a373..2ed27c2109 100644 --- a/ext/pdf/php_pdf.h +++ b/ext/pdf/php_pdf.h @@ -32,9 +32,9 @@ extern zend_module_entry pdf_module_entry; #define pdf_module_ptr &pdf_module_entry -extern PHP_MINFO_FUNCTION(pdf); -extern PHP_MINIT_FUNCTION(pdf); -extern PHP_MSHUTDOWN_FUNCTION(pdf); +PHP_MINFO_FUNCTION(pdf); +PHP_MINIT_FUNCTION(pdf); +PHP_MSHUTDOWN_FUNCTION(pdf); PHP_FUNCTION(pdf_new); /* new function */ PHP_FUNCTION(pdf_delete); /* new function */ PHP_FUNCTION(pdf_open_file); diff --git a/ext/qtdom/qtdom.c b/ext/qtdom/qtdom.c index 9d4ea7d059..0f0e002e29 100644 --- a/ext/qtdom/qtdom.c +++ b/ext/qtdom/qtdom.c @@ -71,17 +71,14 @@ ZEND_GET_MODULE(qtdom) */ PHP_MINIT_FUNCTION(qtdom) { -/* Remove comments if you have entries in php.ini - REGISTER_INI_ENTRIES(); -*/ zend_class_entry qdomdoc_class_entry; zend_class_entry qdomnode_class_entry; INIT_CLASS_ENTRY(qdomdoc_class_entry, "QDomDocument", qdomdoc_class_functions); INIT_CLASS_ENTRY(qdomnode_class_entry, "QDomNode", qdomnode_class_functions); - qdomdoc_class_entry_ptr = zend_register_internal_class(&qdomdoc_class_entry); - qdomnode_class_entry_ptr = zend_register_internal_class(&qdomnode_class_entry); + qdomdoc_class_entry_ptr = zend_register_internal_class(&qdomdoc_class_entry TSRMLS_CC); + qdomnode_class_entry_ptr = zend_register_internal_class(&qdomnode_class_entry TSRMLS_CC); qdom_init(); diff --git a/ext/recode/php_recode.h b/ext/recode/php_recode.h index a765d4f821..9210d0d5b2 100644 --- a/ext/recode/php_recode.h +++ b/ext/recode/php_recode.h @@ -54,12 +54,12 @@ extern zend_module_entry recode_module_entry; #define phpext_recode_ptr &recode_module_entry -extern PHP_MINIT_FUNCTION(recode); -extern PHP_MSHUTDOWN_FUNCTION(recode); -extern PHP_MINFO_FUNCTION(recode); +PHP_MINIT_FUNCTION(recode); +PHP_MSHUTDOWN_FUNCTION(recode); +PHP_MINFO_FUNCTION(recode); -extern PHP_FUNCTION(recode_string); -extern PHP_FUNCTION(recode_file); +PHP_FUNCTION(recode_string); +PHP_FUNCTION(recode_file); typedef struct { RECODE_OUTER outer; diff --git a/ext/recode/recode.c b/ext/recode/recode.c index f1b556ff2f..07acccfd09 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -74,8 +74,6 @@ ZEND_GET_MODULE(recode) PHP_MINIT_FUNCTION(recode) { - TSRMLS_FETCH(); - ReSG(outer) = recode_new_outer(true); if (ReSG(outer) == NULL) return FAILURE; diff --git a/ext/rpc/com/com_wrapper.c b/ext/rpc/com/com_wrapper.c index 93762ccd02..51d953c9c4 100644 --- a/ext/rpc/com/com_wrapper.c +++ b/ext/rpc/com/com_wrapper.c @@ -1686,14 +1686,16 @@ PHP_FUNCTION(com_isenum) } /* }}} */ -void php_register_COM_class() +void php_register_COM_class(void) { + TSRMLS_FETCH(); + INIT_OVERLOADED_CLASS_ENTRY(com_class_entry, "COM", NULL, php_COM_call_function_handler, php_COM_get_property_handler, php_COM_set_property_handler); - zend_register_internal_class(&com_class_entry); + zend_register_internal_class(&com_class_entry TSRMLS_CC); } PHP_MINIT_FUNCTION(COM) diff --git a/ext/rpc/com/php_com.h b/ext/rpc/com/php_com.h index f4c0c6a079..3a2108f415 100644 --- a/ext/rpc/com/php_com.h +++ b/ext/rpc/com/php_com.h @@ -7,25 +7,25 @@ BEGIN_EXTERN_C() -extern PHP_MINIT_FUNCTION(COM); -extern PHP_MSHUTDOWN_FUNCTION(COM); +PHP_MINIT_FUNCTION(COM); +PHP_MSHUTDOWN_FUNCTION(COM); -extern PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult); -extern PHPAPI HRESULT php_COM_get_ids_of_names(comval *obj, OLECHAR FAR* FAR* rgszNames, DISPID FAR* rgDispId); -extern PHPAPI HRESULT php_COM_release(comval *obj); -extern PHPAPI HRESULT php_COM_addref(comval *obj); -extern PHPAPI HRESULT php_COM_set(comval *obj, IDispatch FAR* pDisp, int cleanup); -extern PHPAPI HRESULT php_COM_clone(comval *obj, comval *clone, int cleanup); +PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult); +PHPAPI HRESULT php_COM_get_ids_of_names(comval *obj, OLECHAR FAR* FAR* rgszNames, DISPID FAR* rgDispId); +PHPAPI HRESULT php_COM_release(comval *obj); +PHPAPI HRESULT php_COM_addref(comval *obj); +PHPAPI HRESULT php_COM_set(comval *obj, IDispatch FAR* pDisp, int cleanup); +PHPAPI HRESULT php_COM_clone(comval *obj, comval *clone, int cleanup); -extern int php_COM_get_le_comval(); +int php_COM_get_le_comval(); -extern zend_module_entry COM_module_entry; -extern zend_class_entry com_class_entry; +zend_module_entry COM_module_entry; +zend_class_entry com_class_entry; -extern pval php_COM_get_property_handler(zend_property_reference *property_reference); -extern int php_COM_set_property_handler(zend_property_reference *property_reference, pval *value); -extern char *php_COM_error_message(HRESULT hr); -extern void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference); +pval php_COM_get_property_handler(zend_property_reference *property_reference); +int php_COM_set_property_handler(zend_property_reference *property_reference, pval *value); +char *php_COM_error_message(HRESULT hr); +void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference); #ifdef DEBUG extern int resourcecounter; diff --git a/ext/rpc/com/php_variant.h b/ext/rpc/com/php_variant.h index 47acd13625..5e6d51f821 100644 --- a/ext/rpc/com/php_variant.h +++ b/ext/rpc/com/php_variant.h @@ -7,8 +7,8 @@ extern int php_VARIANT_get_le_variant(); -extern PHP_MINIT_FUNCTION(VARIANT); -extern PHP_MSHUTDOWN_FUNCTION(VARIANT); +PHP_MINIT_FUNCTION(VARIANT); +PHP_MSHUTDOWN_FUNCTION(VARIANT); extern zend_module_entry VARIANT_module_entry; diff --git a/ext/rpc/com/variant.c b/ext/rpc/com/variant.c index 9eaca8d23b..cc79171167 100644 --- a/ext/rpc/com/variant.c +++ b/ext/rpc/com/variant.c @@ -426,14 +426,16 @@ static void php_variant_destructor(zend_rsrc_list_entry *rsrc) efree(rsrc); } -void php_register_VARIANT_class() +void php_register_VARIANT_class(void) { + TSRMLS_FETCH(); + INIT_OVERLOADED_CLASS_ENTRY(VARIANT_class_entry, "VARIANT", NULL, php_VARIANT_call_function_handler, php_VARIANT_get_property_handler, php_VARIANT_set_property_handler); - zend_register_internal_class(&VARIANT_class_entry); + zend_register_internal_class(&VARIANT_class_entry TSRMLS_CC); } #endif /* PHP_WIN32 */ diff --git a/ext/rpc/dotnet/dotnet.cpp b/ext/rpc/dotnet/dotnet.cpp index b6d84a0839..0407150e99 100644 --- a/ext/rpc/dotnet/dotnet.cpp +++ b/ext/rpc/dotnet/dotnet.cpp @@ -184,14 +184,16 @@ void php_DOTNET_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_propert } } -void php_register_DOTNET_class() +void php_register_DOTNET_class(void) { + TSRMLS_FETCH(); + INIT_OVERLOADED_CLASS_ENTRY(dotnet_class_entry, "DOTNET", NULL, php_DOTNET_call_function_handler, php_COM_get_property_handler, php_COM_set_property_handler); - zend_register_internal_class(&dotnet_class_entry); + zend_register_internal_class(&dotnet_class_entry TSRMLS_CC); } function_entry DOTNET_functions[] = { @@ -207,7 +209,6 @@ static PHP_MINFO_FUNCTION(DOTNET) PHP_MINIT_FUNCTION(DOTNET) { - HRESULT hr; CoInitialize(0); hr = dotnet_init(); diff --git a/ext/rpc/dotnet/php_dotnet.h b/ext/rpc/dotnet/php_dotnet.h index 570f4bdc7f..b56af145e2 100644 --- a/ext/rpc/dotnet/php_dotnet.h +++ b/ext/rpc/dotnet/php_dotnet.h @@ -3,8 +3,8 @@ #if WIN32|WINNT -extern PHP_MINIT_FUNCTION(DOTNET); -extern PHP_MSHUTDOWN_FUNCTION(DOTNET); +PHP_MINIT_FUNCTION(DOTNET); +PHP_MSHUTDOWN_FUNCTION(DOTNET); PHP_FUNCTION(DOTNET_load); extern zend_module_entry DOTNET_module_entry; diff --git a/ext/rpc/java/java.c b/ext/rpc/java/java.c index 955d1882d4..61af18ff35 100644 --- a/ext/rpc/java/java.c +++ b/ext/rpc/java/java.c @@ -604,13 +604,14 @@ static void alloc_java_globals_ctor(php_java_globals *java_globals TSRMLS_DC) { } #endif -PHP_MINIT_FUNCTION(java) { +PHP_MINIT_FUNCTION(java) +{ INIT_OVERLOADED_CLASS_ENTRY(java_class_entry, "java", NULL, java_call_function_handler, java_get_property_handler, java_set_property_handler); - zend_register_internal_class(&java_class_entry); + zend_register_internal_class(&java_class_entry TSRMLS_CC); le_jobject = zend_register_list_destructors_ex(_php_java_destructor, NULL, "java", module_number); diff --git a/ext/satellite/class.h b/ext/satellite/class.h index 189362c744..7b69e3447d 100644 --- a/ext/satellite/class.h +++ b/ext/satellite/class.h @@ -168,7 +168,7 @@ zend_bool name##_Init(int module_number) \ putproperty \ ); \ \ - zend_register_internal_class(&name##_class_entry);\ + zend_register_internal_class(&name##_class_entry TSRMLS_CC);\ return TRUE;\ } diff --git a/ext/satellite/php_orbit.h b/ext/satellite/php_orbit.h index 8ede372e5d..5b0bf61034 100644 --- a/ext/satellite/php_orbit.h +++ b/ext/satellite/php_orbit.h @@ -24,19 +24,19 @@ #ifndef _PHP_ORBIT_H #define _PHP_ORBIT_H -extern PHP_MINIT_FUNCTION(satellite); -extern PHP_MSHUTDOWN_FUNCTION(satellite); +PHP_MINIT_FUNCTION(satellite); +PHP_MSHUTDOWN_FUNCTION(satellite); extern zend_module_entry satellite_module_entry; #define satellite_module_ptr &satellite_module_entry #define phpext_satellite_ptr satellite_module_ptr -extern PHP_FUNCTION(satellite_load_idl); -extern PHP_FUNCTION(satellite_get_repository_id); +PHP_FUNCTION(satellite_load_idl); +PHP_FUNCTION(satellite_get_repository_id); /* exception handling */ -extern PHP_FUNCTION(satellite_caught_exception); -extern PHP_FUNCTION(satellite_exception_id); -extern PHP_FUNCTION(satellite_exception_value); +PHP_FUNCTION(satellite_caught_exception); +PHP_FUNCTION(satellite_exception_id); +PHP_FUNCTION(satellite_exception_value); #endif /* _PHP_ORBIT_H */ diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 60e9dcd0ce..ed7e39416b 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -76,6 +76,7 @@ ZEND_GET_MODULE(shmop) static void rsclean(zend_rsrc_list_entry *rsrc) { struct php_shmop *shmop = (struct php_shmop *)rsrc->ptr; + shmdt(shmop->addr); efree(shmop); } diff --git a/ext/standard/assert.c b/ext/standard/assert.c index e7c2b3fd61..74486b60ac 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -83,7 +83,6 @@ static void php_assert_init_globals(php_assert_globals *assert_globals_p TSRMLS_ PHP_MINIT_FUNCTION(assert) { - #ifdef ZTS ts_allocate_id(&assert_globals_id, sizeof(php_assert_globals), (ts_allocate_ctor) php_assert_init_globals, NULL); #else @@ -160,7 +159,7 @@ PHP_FUNCTION(assert) EG(error_reporting) = 0; } - compiled_string_description = zend_make_compiled_string_description("assert code"); + compiled_string_description = zend_make_compiled_string_description("assert code" TSRMLS_CC); if (zend_eval_string(myeval, &retval, compiled_string_description TSRMLS_CC) == FAILURE) { efree(compiled_string_description); zend_error(E_ERROR, "Failure evaluating code:\n%s\n", myeval); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index aa04d039f4..4fc830ab01 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1879,7 +1879,7 @@ void php_call_shutdown_functions(void) TSRMLS_FETCH(); if (BG(user_shutdown_function_names)) zend_try { - zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t)user_shutdown_function_call); + zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call); memcpy(&EG(bailout), &orig_bailout, sizeof(jmp_buf)); zend_hash_destroy(BG(user_shutdown_function_names)); efree(BG(user_shutdown_function_names)); @@ -1965,7 +1965,7 @@ PHP_FUNCTION(highlight_string) php_get_highlight_struct(&syntax_highlighter_ini); - hicompiled_string_description = zend_make_compiled_string_description("highlighted code"); + hicompiled_string_description = zend_make_compiled_string_description("highlighted code" TSRMLS_CC); if (highlight_string(*expr, &syntax_highlighter_ini, hicompiled_string_description)==FAILURE) { efree(hicompiled_string_description); @@ -2086,16 +2086,17 @@ void test_class_call_function(INTERNAL_FUNCTION_PARAMETERS, zend_property_refere } -void test_class_startup() +void test_class_startup(void) { zend_class_entry test_class_entry; + TSRMLS_FETCH(); INIT_OVERLOADED_CLASS_ENTRY(test_class_entry, "OverloadedTestClass", NULL, test_class_call_function, test_class_get_property, test_class_set_property); - zend_register_internal_class(&test_class_entry); + zend_register_internal_class(&test_class_entry TSRMLS_CC); } /* {{{ proto string ini_get(string varname) diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 8104744116..32bbaf9698 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -122,7 +122,7 @@ PHP_MINIT_FUNCTION(dir) le_dirp = zend_register_list_destructors_ex(_dir_dtor, NULL, "dir", module_number); INIT_CLASS_ENTRY(dir_class_entry, "Directory", php_dir_class_functions); - dir_class_entry_ptr = zend_register_internal_class(&dir_class_entry); + dir_class_entry_ptr = zend_register_internal_class(&dir_class_entry TSRMLS_CC); #ifdef ZTS ts_allocate_id(&dir_globals_id, sizeof(php_dir_globals), NULL, NULL); diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c index 4fd4d786f7..44470006f1 100644 --- a/ext/standard/incomplete_class.c +++ b/ext/standard/incomplete_class.c @@ -97,7 +97,7 @@ zend_class_entry *php_create_incomplete_class(TSRMLS_D) incomplete_class_get_property, incomplete_class_set_property); - BG(incomplete_class) = zend_register_internal_class(&incomplete_class); + BG(incomplete_class) = zend_register_internal_class(&incomplete_class TSRMLS_CC); return (BG(incomplete_class)); } diff --git a/ext/standard/pack.h b/ext/standard/pack.h index 76f4375c8f..681331619d 100644 --- a/ext/standard/pack.h +++ b/ext/standard/pack.h @@ -21,7 +21,7 @@ #ifndef PACK_H #define PACK_H -extern PHP_MINIT_FUNCTION(pack); +PHP_MINIT_FUNCTION(pack); PHP_FUNCTION(pack); PHP_FUNCTION(unpack); diff --git a/ext/standard/php_browscap.h b/ext/standard/php_browscap.h index 590d384c83..52436b459a 100644 --- a/ext/standard/php_browscap.h +++ b/ext/standard/php_browscap.h @@ -21,8 +21,8 @@ #ifndef PHP_BROWSCAP_H #define PHP_BROWSCAP_H -extern PHP_MINIT_FUNCTION(browscap); -extern PHP_MSHUTDOWN_FUNCTION(browscap); +PHP_MINIT_FUNCTION(browscap); +PHP_MSHUTDOWN_FUNCTION(browscap); PHP_FUNCTION(get_browser); diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h index 4869ccf43e..b4b04bbd51 100644 --- a/ext/standard/php_crypt.h +++ b/ext/standard/php_crypt.h @@ -25,8 +25,8 @@ PHP_FUNCTION(crypt); #if HAVE_CRYPT -extern PHP_MINIT_FUNCTION(crypt); -extern PHP_RINIT_FUNCTION(crypt); +PHP_MINIT_FUNCTION(crypt); +PHP_RINIT_FUNCTION(crypt); #endif #endif diff --git a/ext/standard/string.c b/ext/standard/string.c index c336da544a..89014fecc0 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -151,7 +151,6 @@ struct lconv *localeconv_r(struct lconv *out) PHP_MINIT_FUNCTION(localeconv) { locale_mutex = tsrm_mutex_alloc(); - return SUCCESS; } /* }}} */ diff --git a/ext/swf/php_swf.h b/ext/swf/php_swf.h index 361f6950d8..32b4d81e71 100644 --- a/ext/swf/php_swf.h +++ b/ext/swf/php_swf.h @@ -29,9 +29,9 @@ extern zend_module_entry swf_module_entry; PHP_MINIT_FUNCTION(swf); PHP_MINFO_FUNCTION(swf); PHP_RINIT_FUNCTION(swf); -extern void php_swf_define(INTERNAL_FUNCTION_PARAMETERS, int opt); -extern void php_swf_fill_bitmap(INTERNAL_FUNCTION_PARAMETERS, int opt); -extern void php_swf_geo_same(INTERNAL_FUNCTION_PARAMETERS, int opt); +void php_swf_define(INTERNAL_FUNCTION_PARAMETERS, int opt); +void php_swf_fill_bitmap(INTERNAL_FUNCTION_PARAMETERS, int opt); +void php_swf_geo_same(INTERNAL_FUNCTION_PARAMETERS, int opt); PHP_FUNCTION(swf_openfile); PHP_FUNCTION(swf_closefile); PHP_FUNCTION(swf_labelframe); diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c index 57f15cda08..1cfbf8073e 100644 --- a/ext/sybase/php_sybase_db.c +++ b/ext/sybase/php_sybase_db.c @@ -177,7 +177,7 @@ static void _close_sybase_link(zend_rsrc_list_entry *rsrc) will *not* be in a consistent state. thies@thieso.net */ - zend_hash_apply(&EG(regular_list),(int (*)(void *))_clean_invalid_results); + zend_hash_apply(&EG(regular_list), (apply_func_t) _clean_invalid_results); dbclose(sybase_ptr->link); dbloginfree(sybase_ptr->login); efree(sybase_ptr); diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 2cde34d177..a0b144f0c6 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -149,7 +149,7 @@ static void _close_sybase_link(zend_rsrc_list_entry *rsrc) sybase_ptr->valid = 0; - zend_hash_apply(&EG(regular_list),(int (*)(void *))_clean_invalid_results); + zend_hash_apply(&EG(regular_list), (apply_func_t) _clean_invalid_results); /* Non-persistent connections will always be connected or we wouldn't * get here, but since we want to check the death status anyway diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c index 5cfb0b37db..8f0f5e3b1b 100644 --- a/ext/sysvsem/sysvsem.c +++ b/ext/sysvsem/sysvsem.c @@ -143,7 +143,6 @@ static void release_sysvsem_sem(zend_rsrc_list_entry *rsrc) PHP_MINIT_FUNCTION(sysvsem) { php_sysvsem_module.le_sem = zend_register_list_destructors_ex(release_sysvsem_sem, NULL, "sysvsem", module_number); - return SUCCESS; } /* }}} */ diff --git a/ext/sysvshm/php_sysvshm.h b/ext/sysvshm/php_sysvshm.h index a8508ca81b..266753f700 100644 --- a/ext/sysvshm/php_sysvshm.h +++ b/ext/sysvshm/php_sysvshm.h @@ -68,9 +68,9 @@ PHP_FUNCTION(shm_remove); PHP_FUNCTION(shm_put_var); PHP_FUNCTION(shm_get_var); PHP_FUNCTION(shm_remove_var); -extern int php_put_shm_data(sysvshm_chunk_head *ptr,long key,char *data, long len); -extern long php_check_shm_data(sysvshm_chunk_head *ptr, long key); -extern int php_remove_shm_data(sysvshm_chunk_head *ptr, long shm_varpos); +int php_put_shm_data(sysvshm_chunk_head *ptr,long key,char *data, long len); +long php_check_shm_data(sysvshm_chunk_head *ptr, long key); +int php_remove_shm_data(sysvshm_chunk_head *ptr, long shm_varpos); extern sysvshm_module php_sysvshm; diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c index c367bac326..d71cd5401c 100644 --- a/ext/xslt/sablot.c +++ b/ext/xslt/sablot.c @@ -149,7 +149,6 @@ static SchemeHandler scheme_handler = { PHP_MINIT_FUNCTION(xslt) { le_xslt = zend_register_list_destructors_ex(free_processor, NULL, le_xslt_name, module_number); - return SUCCESS; } /* }}} */ diff --git a/ext/zip/zip.c b/ext/zip/zip.c index c466d82d42..c35258e907 100644 --- a/ext/zip/zip.c +++ b/ext/zip/zip.c @@ -100,7 +100,6 @@ PHP_MINIT_FUNCTION(zip) { le_zip_dir = zend_register_list_destructors_ex(php_zip_free_dir, NULL, le_zip_dir_name, module_number); le_zip_entry = zend_register_list_destructors_ex(php_zip_free_entry, NULL, le_zip_entry_name, module_number); - return(SUCCESS); } /* }}} */ diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 120ffc4a5f..9f997ed38c 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -158,8 +158,6 @@ static void php_zlib_init_globals(php_zlib_globals *zlib_globals_p TSRMLS_DC) */ PHP_MINIT_FUNCTION(zlib) { - TSRMLS_FETCH(); - #ifdef ZTS ts_allocate_id(&zlib_globals_id, sizeof(php_zlib_globals), (ts_allocate_ctor) php_zlib_init_globals, NULL); #else diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c index 642f81a6be..11990c0d1a 100644 --- a/main/internal_functions_win32.c +++ b/main/internal_functions_win32.c @@ -60,7 +60,7 @@ #include "ext/xml/php_xml.h" #include "ext/wddx/php_wddx.h" #include "ext/mysql/php_mysql.h" -#include "ext/mysql/mbstring.h" +#include "ext/mbstring/mbstring.h" /* }}} */ /* {{{ php_builtin_extensions[] diff --git a/main/main.c b/main/main.c index 41ea7053d8..20bf73977f 100644 --- a/main/main.c +++ b/main/main.c @@ -700,7 +700,7 @@ void php_request_shutdown(void *dummy) } zend_end_try(); if (PG(modules_activated)) { - zend_deactivate_modules(); + zend_deactivate_modules(TSRMLS_C); } zend_deactivate(TSRMLS_C); diff --git a/main/php.h b/main/php.h index 910992a0f5..34cdeae6e4 100644 --- a/main/php.h +++ b/main/php.h @@ -221,16 +221,12 @@ char *strerror(int); #define PHP_RINIT(module) php_rinit_##module #define PHP_RSHUTDOWN(module) php_rshutdown_##module #define PHP_MINFO(module) php_info_##module -#define PHP_GINIT(module) php_ginit_##module -#define PHP_GSHUTDOWN(module) php_gshutdown_##module #define PHP_MINIT_FUNCTION(module) int PHP_MINIT(module)(INIT_FUNC_ARGS) #define PHP_MSHUTDOWN_FUNCTION(module) int PHP_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS) #define PHP_RINIT_FUNCTION(module) int PHP_RINIT(module)(INIT_FUNC_ARGS) #define PHP_RSHUTDOWN_FUNCTION(module) int PHP_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS) #define PHP_MINFO_FUNCTION(module) void PHP_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS) -#define PHP_GINIT_FUNCTION(module) int PHP_GINIT(module)(GINIT_FUNC_ARGS) -#define PHP_GSHUTDOWN_FUNCTION(module) int PHP_GSHUTDOWN(module)(void) /* global variables */ diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index a38cc94735..852505149a 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -521,7 +521,7 @@ static int send_php(request_rec *r, int display_source_mode, char *filename) per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module); if (per_dir_conf) { - zend_hash_apply((HashTable *) per_dir_conf, (int (*)(void *)) php_apache_alter_ini_entries); + zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries); } /* If PHP parser engine has been turned off with an "engine off" |