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);
}
/* }}} */
-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)
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 */
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;
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;
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);
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);
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);
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;
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.
/* 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);
#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);
}
}
-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[] = {
PHP_MINIT_FUNCTION(DOTNET)
{
-
HRESULT hr;
CoInitialize(0);
hr = dotnet_init();
#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;
#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);
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
/* 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);
*/
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);
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();
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);
PHP_MINIT_FUNCTION(icap)
{
-
le_icap = zend_register_list_destructors_ex(cal_close_it, NULL, "icap", module_number);
-
return SUCCESS;
}
#include "build-defs.h"
#endif
-extern PHP_MINIT_FUNCTION(icap);
+PHP_MINIT_FUNCTION(icap);
PHP_MINFO_FUNCTION(icap);
/* Functions accessable to PHP */
PHP_MINIT_FUNCTION(ibase)
{
- TSRMLS_FETCH();
-
ZEND_INIT_MODULE_GLOBALS(ibase, php_ibase_init_globals, NULL);
REGISTER_INI_ENTRIES();
#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);
}
#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);
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 */
#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
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;
}
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);
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);
#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);
*/
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);
#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);
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! */
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));
#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");
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 =
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);
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 =
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;
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;
/* 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);
#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);
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;
}
*/
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
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);
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);
*/
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();
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;
PHP_MINIT_FUNCTION(recode)
{
- TSRMLS_FETCH();
-
ReSG(outer) = recode_new_outer(true);
if (ReSG(outer) == NULL)
return FAILURE;
}
/* }}} */
-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)
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;
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;
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 */
}
}
-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[] = {
PHP_MINIT_FUNCTION(DOTNET)
{
-
HRESULT hr;
CoInitialize(0);
hr = dotnet_init();
#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;
}
#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);
putproperty \
); \
\
- zend_register_internal_class(&name##_class_entry);\
+ zend_register_internal_class(&name##_class_entry TSRMLS_CC);\
return TRUE;\
}
#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 */
static void rsclean(zend_rsrc_list_entry *rsrc)
{
struct php_shmop *shmop = (struct php_shmop *)rsrc->ptr;
+
shmdt(shmop->addr);
efree(shmop);
}
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
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);
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));
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);
}
-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)
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);
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));
}
#ifndef PACK_H
#define PACK_H
-extern PHP_MINIT_FUNCTION(pack);
+PHP_MINIT_FUNCTION(pack);
PHP_FUNCTION(pack);
PHP_FUNCTION(unpack);
#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);
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
PHP_MINIT_FUNCTION(localeconv)
{
locale_mutex = tsrm_mutex_alloc();
-
return SUCCESS;
}
/* }}} */
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);
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);
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
PHP_MINIT_FUNCTION(sysvsem)
{
php_sysvsem_module.le_sem = zend_register_list_destructors_ex(release_sysvsem_sem, NULL, "sysvsem", module_number);
-
return SUCCESS;
}
/* }}} */
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;
PHP_MINIT_FUNCTION(xslt)
{
le_xslt = zend_register_list_destructors_ex(free_processor, NULL, le_xslt_name, module_number);
-
return SUCCESS;
}
/* }}} */
{
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);
}
/* }}} */
*/
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
#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[]
} zend_end_try();
if (PG(modules_activated)) {
- zend_deactivate_modules();
+ zend_deactivate_modules(TSRMLS_C);
}
zend_deactivate(TSRMLS_C);
#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 */
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"