]> granicus.if.org Git - php/commitdiff
Avoid TSRMLS_FETCH()'s, and clean up a bit of stale extern's and layout on the way
authorZeev Suraski <zeev@php.net>
Mon, 30 Jul 2001 01:56:43 +0000 (01:56 +0000)
committerZeev Suraski <zeev@php.net>
Mon, 30 Jul 2001 01:56:43 +0000 (01:56 +0000)
72 files changed:
ext/aspell/php_aspell.h
ext/com/COM.c
ext/com/VARIANT.c
ext/com/php_COM.h
ext/com/php_VARIANT.h
ext/cpdf/php_cpdf.h
ext/dbase/php_dbase.h
ext/dbplus/dbplus.c
ext/dbx/dbx.c
ext/domxml/php_domxml.c
ext/domxml/php_domxml.h
ext/dotnet/dotnet.cpp
ext/dotnet/php_dotnet.h
ext/fbsql/php_fbsql.h
ext/filepro/php_filepro.h
ext/gd/php_gd.h
ext/gmp/gmp.c
ext/hyperwave/hw.c
ext/hyperwave/php_hyperwave.h
ext/icap/php_icap.c
ext/icap/php_icap.h
ext/interbase/interbase.c
ext/interbase/php_interbase.h
ext/java/java.c
ext/mbstring/mbstring.h
ext/mcal/php_mcal.h
ext/ming/ming.c
ext/mssql/php_mssql.c
ext/mssql/php_mssql.h
ext/mysql/php_mysql.h
ext/ncurses/ncurses.c
ext/notes/php_notes.h
ext/oci8/oci8.c
ext/odbc/php_odbc.h
ext/odbc/php_velocis.h
ext/odbc/velocis.c
ext/oracle/oracle.c
ext/pcre/php_pcre.c
ext/pdf/php_pdf.h
ext/qtdom/qtdom.c
ext/recode/php_recode.h
ext/recode/recode.c
ext/rpc/com/com_wrapper.c
ext/rpc/com/php_com.h
ext/rpc/com/php_variant.h
ext/rpc/com/variant.c
ext/rpc/dotnet/dotnet.cpp
ext/rpc/dotnet/php_dotnet.h
ext/rpc/java/java.c
ext/satellite/class.h
ext/satellite/php_orbit.h
ext/shmop/shmop.c
ext/standard/assert.c
ext/standard/basic_functions.c
ext/standard/dir.c
ext/standard/incomplete_class.c
ext/standard/pack.h
ext/standard/php_browscap.h
ext/standard/php_crypt.h
ext/standard/string.c
ext/swf/php_swf.h
ext/sybase/php_sybase_db.c
ext/sybase_ct/php_sybase_ct.c
ext/sysvsem/sysvsem.c
ext/sysvshm/php_sysvshm.h
ext/xslt/sablot.c
ext/zip/zip.c
ext/zlib/zlib.c
main/internal_functions_win32.c
main/main.c
main/php.h
sapi/apache/mod_php4.c

index 09541eb832e091574fc48bee16f320d4bf47b7fd..3047c99a3f2aa918cfe6398ae86d116a29bfa3e0 100644 (file)
@@ -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);
index 93762ccd02d58ed98257b5719a1b22cdd273565c..51d953c9c4b8e40edb4070ea59749b0ed2ada4b0 100644 (file)
@@ -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)
index 9eaca8d23bf19318eebe884561aef4c36b6fe0e8..cc79171167b3c5c4f88c92bac43a5f525809e2e9 100644 (file)
@@ -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 */
index f4c0c6a07971f3232bf43953469cafa4f9c46cda..3a2108f4153f2ce219c95facc99ae58bb8cdba5f 100644 (file)
@@ -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;
index 47acd13625bedd237df77c277649f5d5ba97ba19..5e6d51f82180943bd55dbfd755ac3bf85a5a46a9 100644 (file)
@@ -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;
 
index d9457b96750b389b127e3ade1f560997d270572b..6bc6288248402d3352c1ace57b7e2e941a9631b3 100644 (file)
 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);
index c01511db7775191a296ba14fa2b2f783b5ec5f81..18d0873277d2f8990ccace1c72f8b313072004c4 100644 (file)
@@ -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);
index 48fad7bd4088336589537513943687e7c605c21f..1768108e5f9239092ef51d9d1ca8aea5fa0d881e 100644 (file)
@@ -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);
index 1e54ad06891c58ce686f7be86db3dcb77745be24..f4ec5c39a4bf91dbf80d81661c28c8f6babc339b 100644 (file)
@@ -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;
index f6b525d06b165a0a4ad1ec6cd55113cd2130923e..a13bd0d7f0f7ef469cfe042a059a76ca684deb45 100644 (file)
@@ -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);
index d318230919aace8a8a3e9b439c3be26bd0514358..6c7fcc26edf9c266037e05d1d0afa818bf1bc3aa 100644 (file)
@@ -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);
index b6d84a08392ba83e1cd032b5d5185b2c710acb16..0407150e994319d19811f3b3550367e8521320ed 100644 (file)
@@ -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();
index 570f4bdc7f98c112eec31c91fba4b10758a5da11..b56af145e2deeed13dd86f99c59826a151cb3203 100644 (file)
@@ -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;
index 064ce5d95449bc8b757d22d4817315f4f9b8f11d..9aa0894cf505fe257a1c033c1e109612e1eb7591 100644 (file)
@@ -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);
index 8c5b8f4973572a8c0b3ac0a0dc536e4e06f837e0..f060fc277b288f511b241fb6f46d382fcc9f512c 100644 (file)
@@ -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
index 25c27412f91d8471cea4e70442492b66d7b88c3f..f29695831bec18ad06a7c5b5503a07a47734728b 100644 (file)
@@ -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);
index aaed49bad17be0228d6635695af19e348dfb78d7..a5dc03b1406c88289ade07df9ec6e588180f32f3 100644 (file)
@@ -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);
index 42e30a7ea7d6a2a68f64a4ca9ae35e9b58a90bbd..16903522af6c3ce2b32b80c10297226e1458d5a5 100644 (file)
@@ -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();
index 1ae69f4b55e63b2fa0daf7a4973d103e0a9ddb7e..c56f3c22d11a5533d1ced27b8480f8feaedbba06 100644 (file)
@@ -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);
index d0fa13cf16040587ac3a9db8a3551863a9934220..7856ad6b895f378161d16e5aa0443dadce6ecaf8 100644 (file)
@@ -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;
 }
 
index 2370f3d270d5251790e3f45fb40f65a892203615..196dbc02a14634fb55fc2ced64e57335e9c8fa48 100644 (file)
@@ -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 */
index b443bd9fa443c32dde5775e9f383026ce25b9fb8..fc603f253dd106ad77e8af6dc82bfd95216ada72 100644 (file)
@@ -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();
index d7d4b55817e85b40a2550ddec11e7afcd4c2280f..2200c574c56ee7b8612e93e65608d19f7ea77f39 100644 (file)
@@ -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);
index 955d1882d423935c38a8c00a04fc97aaa07e4c4a..61af18ff359839f09f447aeea76f7450fa8fceda 100644 (file)
@@ -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);
 
index 1c72b2d2559e461740df8b962cdd0e96485f54c4..fe6178daa089d7ac9135d6ecc414d338726dbfcb 100644 (file)
 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 */
index 902c25dcc28c6f67aca6623e083b28ef97c78010..fb4d24af48e154f3122f2a300d292a3e39f0289c 100644 (file)
@@ -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
 
 
index bcd2e2d540c17df6888a215b6bacf05680e7034a..6b4558b761d55165044733eaeda7b10029fc86a7 100644 (file)
@@ -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;
 }
index 4a304d606f8d5f050737c9d517116408b784645b..608c69ab1ebabcea97b75ee54a303bc4b3cef511 100644 (file)
@@ -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);
index 85572c4099c8a0c1bddd2416f452ab8c09cfdaad..2d7d90d9153366ceb2a474faedb16e2495baf79f 100644 (file)
 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);
index a3c701077eb3861e46ef0ce3c09fdbf174e711fb..ff091aa2af19a949ded480ccfae7dd5a42f55cd3 100644 (file)
@@ -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);
index 612600239828dcabf9228d72f9a558b4ca6b7f76..34c1a767da55ebed76cf431637618085a9c979b9 100644 (file)
@@ -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);
index e7412a63e8cb670dec482dab3e6972ce4a44e495..35ff36eaa2a7717dc1fda475e52579b9cd6eae22 100644 (file)
@@ -23,10 +23,10 @@ extern zend_module_entry notes_module_entry;
 
 #define notes_module_ptr &notes_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);
index 57f6da7ac7080e39da87519c54dc97b55cedfa33..c2c9ba4402d2be1a0b170642d7a076186623c675 100644 (file)
@@ -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;
index 23bbde9b7b00468d58a8f1b525bfef76dd10fde2..5d597e960787849ccd96833e03c40f47ad980cc1 100644 (file)
@@ -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);
index 0ac48f43d528c5fadcdee1b02ce49c4b0814af4f..109795255b7b3ace6d059ffac2ed6b9e852f60c4 100644 (file)
@@ -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);
index 1491cb0239ee731301f75384ea1064dcbd239de1..5d47f0edb4e7b51e7d3c9133a71140b3cb96d5e8 100644 (file)
@@ -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;
        }
index e9e640c57272e127a0436b56ed79bf812dd8ebf0..05894d0721723fc0343eee65647527a14b21fc1c 100644 (file)
@@ -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
index 3cc25da0088ead778e2fcc603583384f9d3c7bed..8d7dcb7ba2dabdbd16c22743ae888631cbe25b5e 100644 (file)
@@ -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);
index d1dfb5a3736f86541d70bc95f34dbdc85b8f1cf5..2ed27c2109574773336692fd078dd65e817bce39 100644 (file)
@@ -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);
index 9d4ea7d059574877ea96c49140818f9be6606e9d..0f0e002e29d8a53e380f649625e7905d54ab2364 100644 (file)
@@ -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();
 
index a765d4f8215a9f96e283aeb517ce4be67ebeb932..9210d0d5b2dc98bd4a8103432b34cac63525cde5 100644 (file)
 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;
index f1b556ff2fa63dc0ef91192fb6cdc18cf987e861..07acccfd09a53ec808fde71951780eced88f713c 100644 (file)
@@ -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;
index 93762ccd02d58ed98257b5719a1b22cdd273565c..51d953c9c4b8e40edb4070ea59749b0ed2ada4b0 100644 (file)
@@ -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)
index f4c0c6a07971f3232bf43953469cafa4f9c46cda..3a2108f4153f2ce219c95facc99ae58bb8cdba5f 100644 (file)
@@ -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;
index 47acd13625bedd237df77c277649f5d5ba97ba19..5e6d51f82180943bd55dbfd755ac3bf85a5a46a9 100644 (file)
@@ -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;
 
index 9eaca8d23bf19318eebe884561aef4c36b6fe0e8..cc79171167b3c5c4f88c92bac43a5f525809e2e9 100644 (file)
@@ -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 */
index b6d84a08392ba83e1cd032b5d5185b2c710acb16..0407150e994319d19811f3b3550367e8521320ed 100644 (file)
@@ -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();
index 570f4bdc7f98c112eec31c91fba4b10758a5da11..b56af145e2deeed13dd86f99c59826a151cb3203 100644 (file)
@@ -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;
index 955d1882d423935c38a8c00a04fc97aaa07e4c4a..61af18ff359839f09f447aeea76f7450fa8fceda 100644 (file)
@@ -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);
 
index 189362c744e29828b812621e83b022c68e4ec1c3..7b69e3447d8c94be0640020f6b59e8be5d69b3e9 100644 (file)
@@ -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;\
 }
 
index 8ede372e5d03f032328a5e27e1e1362ca46b2ebc..5b0bf61034201ba52d0a5a95ae4151e38a5d634e 100644 (file)
 #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 */
index 60e9dcd0ceaaaf8ee351d53f92caefe9b159b322..ed7e39416bfc52f76a983b425feab6c58d68824b 100644 (file)
@@ -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);
 }
index e7c2b3fd618fa44361de39298ee655a57c647247..74486b60ac20f96487e111dcd1d36459fc2693f7 100644 (file)
@@ -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);
index aa04d039f42e58f3318a07a026fe677478936378..4fc830ab010046b1fe9f90386ccdaaa579af9868 100644 (file)
@@ -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)
index 81047441167e7f5c3698203f42c8fba73711f8a5..32bbaf969853992a4271e0435cb16dba71b864d9 100644 (file)
@@ -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);
index 4fd4d786f764de42a8c3f49b130b0a5eaffabb80..44470006f195d8726989c438e4a151fd376a5d98 100644 (file)
@@ -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));
 }
index 76f4375c8fa7afd1201d57b73f277ffc1014310e..681331619d250cce843525329abeaa79508c4aa6 100644 (file)
@@ -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);
 
index 590d384c837efa52c71e2a3ade548adad7acf160..52436b459a462c1e880d1088a266eb65574d9312 100644 (file)
@@ -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);
 
index 4869ccf43e151e9b214a936510c801459b581815..b4b04bbd51277a8552877eb2d02521b123e1e4c9 100644 (file)
@@ -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
index c336da544a838d1d13776211f6fd52fa59314c7e..89014fecc08cc96551ada5867b5f39b32c4d9957 100644 (file)
@@ -151,7 +151,6 @@ struct lconv *localeconv_r(struct lconv *out)
 PHP_MINIT_FUNCTION(localeconv)
 {
        locale_mutex = tsrm_mutex_alloc();
-
        return SUCCESS;
 }
 /* }}} */
index 361f6950d8b3931df08d71384185bff106d609b0..32b4d81e7161da9ed6bafd9b11af6839071b4a47 100644 (file)
@@ -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);
index 57f15cda084c415927eaabf01c5e66f13dfe1064..1cfbf8073e2602e99f6da8299da96872b658c122 100644 (file)
@@ -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);
index 2cde34d177ad2acc4a7035b2f4603789eaa0559c..a0b144f0c6541c9534f747cc158c7ed237a7a292 100644 (file)
@@ -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
index 5cfb0b37dbb773cefd8f03b1a689e56e62968944..8f0f5e3b1bc64ebd44cbfbdf19b5e48b23743667 100644 (file)
@@ -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;
 }
 /* }}} */
index a8508ca81b13282e35e3b973cd85373a7b4f64d2..266753f70051b11a568fffeadd14ba97aff9baec 100644 (file)
@@ -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;
 
index c367bac3264a80b4ee18ef76178c5c1d04d0ffd0..d71cd5401cab1606b2c6e057ea805b32f65e311e 100644 (file)
@@ -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;
 }
 /* }}} */
index c466d82d42b2a5cded6bb26a166915289fcdb327..c35258e907ffa215a348ee7a766e98eaf9bab53c 100644 (file)
@@ -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);
 }
 /* }}} */
index 120ffc4a5f0f945650b1ad20d18d850bdc26bdd4..9f997ed38c871fcaf9aa48b18b43556d137fa95d 100644 (file)
@@ -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
index 642f81a6bedf4c0a2364ac077463a6c018235dc1..11990c0d1a8f5e5c9c07fbd3b716071c16375653 100644 (file)
@@ -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[]
index 41ea7053d89822a0d189457267eb6fb0baeafbf3..20bf73977f9cf1ad0bb179d6efc29a56e93a485a 100644 (file)
@@ -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);
index 910992a0f5851adfb9c8fd52ed5f85bef9ea1d94..34cdeae6e4c5755b8bb5bfa154896d54d0d5bfa9 100644 (file)
@@ -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 */
index a38cc94735486253e43d1be3325a693cc6096b52..852505149a6bdac06855e9cb5ba7403a22a7e19a 100644 (file)
@@ -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"