From 26b08f9857e79b3281d580846e8eb9c27b24af32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Schl=C3=BCter?= Date: Tue, 30 Mar 2010 23:03:02 +0000 Subject: [PATCH] Remove main/php3_compat.h, for that a few references to `function_entry` have to be replaced by `zend_function_entry`. --- ext/enchant/enchant.c | 2 +- ext/fileinfo/fileinfo.c | 4 +- ext/intl/collator/collator_class.c | 2 +- ext/intl/dateformat/dateformat_class.c | 2 +- ext/intl/formatter/formatter_class.c | 2 +- ext/intl/locale/locale_class.c | 2 +- ext/intl/msgformat/msgformat_class.c | 2 +- ext/intl/normalizer/normalizer_class.c | 2 +- .../resourcebundle/resourcebundle_class.c | 2 +- ext/json/json.c | 2 +- ext/pdo_odbc/pdo_odbc.c | 2 +- ext/phar/phar.c | 2 +- ext/reflection/php_reflection.c | 5 - main/php.h | 1 - main/php3_compat.h | 122 ------------------ 15 files changed, 13 insertions(+), 141 deletions(-) delete mode 100644 main/php3_compat.h diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index e415019b86..c123e6756e 100755 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -124,7 +124,7 @@ ZEND_END_ARG_INFO() * * Every user visible function must have an entry in enchant_functions[]. */ -function_entry enchant_functions[] = { +zend_function_entry enchant_functions[] = { PHP_FE(enchant_broker_init, arginfo_enchant_broker_init) PHP_FE(enchant_broker_free, arginfo_enchant_broker_free) PHP_FE(enchant_broker_get_error, arginfo_enchant_broker_free) diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index 443129bd91..e0e9868897 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -167,7 +167,7 @@ ZEND_END_ARG_INFO() /* {{{ finfo_class_functions */ -function_entry finfo_class_functions[] = { +zend_function_entry finfo_class_functions[] = { ZEND_ME_MAPPING(finfo, finfo_open, arginfo_finfo_open, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(set_flags, finfo_set_flags,arginfo_finfo_method_set_flags, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(file, finfo_file, arginfo_finfo_method_file, ZEND_ACC_PUBLIC) @@ -201,7 +201,7 @@ void finfo_resource_destructor(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */ /* {{{ fileinfo_functions[] */ -function_entry fileinfo_functions[] = { +zend_function_entry fileinfo_functions[] = { PHP_FE(finfo_open, arginfo_finfo_open) PHP_FE(finfo_close, arginfo_finfo_close) PHP_FE(finfo_set_flags, arginfo_finfo_set_flags) diff --git a/ext/intl/collator/collator_class.c b/ext/intl/collator/collator_class.c index ee16ee03e1..d73126a859 100755 --- a/ext/intl/collator/collator_class.c +++ b/ext/intl/collator/collator_class.c @@ -111,7 +111,7 @@ ZEND_END_ARG_INFO() * Every 'Collator' class method has an entry in this table */ -function_entry Collator_class_functions[] = { +zend_function_entry Collator_class_functions[] = { PHP_ME( Collator, __construct, collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR ) ZEND_FENTRY( create, ZEND_FN( collator_create ), collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) PHP_NAMED_FE( compare, ZEND_FN( collator_compare ), collator_2_args ) diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c index 7df95816e2..3976951d0b 100755 --- a/ext/intl/dateformat/dateformat_class.c +++ b/ext/intl/dateformat/dateformat_class.c @@ -126,7 +126,7 @@ ZEND_END_ARG_INFO() /* {{{ IntlDateFormatter_class_functions * Every 'IntlDateFormatter' class method has an entry in this table */ -static function_entry IntlDateFormatter_class_functions[] = { +static zend_function_entry IntlDateFormatter_class_functions[] = { PHP_ME( IntlDateFormatter, __construct, arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR ) ZEND_FENTRY( create, ZEND_FN( datefmt_create ), arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), arginfo_intldateformatter_getdatetype ) diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c index a6f45108ea..43d4d741d5 100755 --- a/ext/intl/formatter/formatter_class.c +++ b/ext/intl/formatter/formatter_class.c @@ -137,7 +137,7 @@ ZEND_END_ARG_INFO() /* {{{ NumberFormatter_class_functions * Every 'NumberFormatter' class method has an entry in this table */ -static function_entry NumberFormatter_class_functions[] = { +static zend_function_entry NumberFormatter_class_functions[] = { PHP_ME( NumberFormatter, __construct, arginfo_numberformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR ) ZEND_FENTRY( create, ZEND_FN( numfmt_create ), arginfo_numberformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) PHP_NAMED_FE( format, ZEND_FN( numfmt_format ), arginfo_numberformatter_format ) diff --git a/ext/intl/locale/locale_class.c b/ext/intl/locale/locale_class.c index 8a9efbd832..bba6449ac7 100755 --- a/ext/intl/locale/locale_class.c +++ b/ext/intl/locale/locale_class.c @@ -66,7 +66,7 @@ ZEND_END_ARG_INFO() * Every 'Locale' class method has an entry in this table */ -function_entry Locale_class_functions[] = { +zend_function_entry Locale_class_functions[] = { ZEND_FENTRY( getDefault, zif_locale_get_default , locale_0_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) ZEND_FENTRY( setDefault, zif_locale_set_default , locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) ZEND_FENTRY( getPrimaryLanguage, ZEND_FN( locale_get_primary_language ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c index b710ee7086..28906d4e4c 100755 --- a/ext/intl/msgformat/msgformat_class.c +++ b/ext/intl/msgformat/msgformat_class.c @@ -107,7 +107,7 @@ ZEND_END_ARG_INFO() /* {{{ MessageFormatter_class_functions * Every 'MessageFormatter' class method has an entry in this table */ -static function_entry MessageFormatter_class_functions[] = { +static zend_function_entry MessageFormatter_class_functions[] = { PHP_ME( MessageFormatter, __construct, arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR ) ZEND_FENTRY( create, ZEND_FN( msgfmt_create ), arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) PHP_NAMED_FE( format, ZEND_FN( msgfmt_format ), arginfo_messageformatter_format ) diff --git a/ext/intl/normalizer/normalizer_class.c b/ext/intl/normalizer/normalizer_class.c index 75894fffc3..736f7ecbf4 100755 --- a/ext/intl/normalizer/normalizer_class.c +++ b/ext/intl/normalizer/normalizer_class.c @@ -41,7 +41,7 @@ ZEND_END_ARG_INFO() * Every 'Normalizer' class method has an entry in this table */ -function_entry Normalizer_class_functions[] = { +zend_function_entry Normalizer_class_functions[] = { ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) { NULL, NULL, NULL } diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c index bebd0e8282..85a3f9d700 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.c +++ b/ext/intl/resourcebundle/resourcebundle_class.c @@ -387,7 +387,7 @@ PHP_FUNCTION( resourcebundle_get_error_message ) /* {{{ ResourceBundle_class_functions * Every 'ResourceBundle' class method has an entry in this table */ -static function_entry ResourceBundle_class_functions[] = { +static zend_function_entry ResourceBundle_class_functions[] = { PHP_ME( ResourceBundle, __construct, arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR ) ZEND_NAMED_ME( create, ZEND_FN( resourcebundle_create ), arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) ZEND_NAMED_ME( get, ZEND_FN(resourcebundle_get), arginfo_resourcebundle_get, ZEND_ACC_PUBLIC ) diff --git a/ext/json/json.c b/ext/json/json.c index 5d166f0a3e..8fdacc193f 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -65,7 +65,7 @@ ZEND_END_ARG_INFO() /* }}} */ /* {{{ json_functions[] */ -static const function_entry json_functions[] = { +static const zend_function_entry json_functions[] = { PHP_FE(json_encode, arginfo_json_encode) PHP_FE(json_decode, arginfo_json_decode) PHP_FE(json_last_error, arginfo_json_last_error) diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c index 319cf2067d..0ea92a9009 100755 --- a/ext/pdo_odbc/pdo_odbc.c +++ b/ext/pdo_odbc/pdo_odbc.c @@ -31,7 +31,7 @@ #include "php_pdo_odbc_int.h" /* {{{ pdo_odbc_functions[] */ -const function_entry pdo_odbc_functions[] = { +const zend_function_entry pdo_odbc_functions[] = { {NULL, NULL, NULL} }; /* }}} */ diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 6dee760a9c..52179b1246 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -3289,7 +3289,7 @@ ZEND_GET_MODULE(phar) * * Every user visible function must have an entry in phar_functions[]. */ -function_entry phar_functions[] = { +zend_function_entry phar_functions[] = { {NULL, NULL, NULL} /* Must be the last line in phar_functions[] */ }; /* }}}*/ diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 8afbac60cc..bafa7c8fa6 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -41,11 +41,6 @@ #include "zend_closures.h" #include "zend_extensions.h" -/* Undefine "getParameters" macro defined in "main/php3_compat.h" */ -#ifdef getParameters -# undef getParameters -#endif - /* Class entry pointers */ PHPAPI zend_class_entry *reflector_ptr; PHPAPI zend_class_entry *reflection_exception_ptr; diff --git a/main/php.h b/main/php.h index e858e3c424..43c8cbfc48 100644 --- a/main/php.h +++ b/main/php.h @@ -182,7 +182,6 @@ typedef unsigned int socklen_t; #endif #include "zend_hash.h" -#include "php3_compat.h" #include "zend_alloc.h" #include "zend_stack.h" diff --git a/main/php3_compat.h b/main/php3_compat.h deleted file mode 100644 index fdd2567674..0000000000 --- a/main/php3_compat.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PHP Version 5 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997-2010 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: | - +----------------------------------------------------------------------+ -*/ - -/* $Id$ */ - -#ifndef PHP3_COMPAT_H -#define PHP3_COMPAT_H - -typedef zval pval; - -#define pval_copy_constructor zval_copy_ctor -#define pval_destructor zval_dtor - -#define _php3_hash_init zend_hash_init -#define _php3_hash_destroy zend_hash_destroy - -#define _php3_hash_clean zend_hash_clean - -#define _php3_hash_add_or_update zend_hash_add_or_update -#define _php3_hash_add zend_hash_add -#define _php3_hash_update zend_hash_update - -#define _php3_hash_quick_add_or_update zend_hash_quick_add_or_update -#define _php3_hash_quick_add zend_hash_quick_add -#define _php3_hash_quick_update zend_hash_quick_update - -#define _php3_hash_index_update_or_next_insert zend_hash_index_update_or_next_insert -#define _php3_hash_index_update zend_hash_index_update -#define _php3_hash_next_index_insert zend_hash_next_index_insert - -#define _php3_hash_pointer_update zend_hash_pointer_update - -#define _php3_hash_pointer_index_update_or_next_insert zend_hash_pointer_index_update_or_next_insert -#define _php3_hash_pointer_index_update zend_hash_pointer_index_update -#define _php3_hash_next_index_pointer_update zend_hash_next_index_pointer_update -#define _php3_hash_next_index_pointer_insert zend_hash_next_index_pointer_insert - -#define _php3_hash_del_key_or_index zend_hash_del_key_or_index -#define _php3_hash_del zend_hash_del -#define _php3_hash_index_del zend_hash_index_del - -#define _php3_hash_find zend_hash_find -#define _php3_hash_quick_find zend_hash_quick_find -#define _php3_hash_index_find zend_hash_index_find - -#define _php3_hash_exists zend_hash_exists -#define _php3_hash_index_exists zend_hash_index_exists -#define _php3_hash_is_pointer zend_hash_is_pointer -#define _php3_hash_index_is_pointer zend_hash_index_is_pointer -#define _php3_hash_next_free_element zend_hash_next_free_element - -#define _php3_hash_move_forward zend_hash_move_forward -#define _php3_hash_move_backwards zend_hash_move_backwards -#define _php3_hash_get_current_key zend_hash_get_current_key -#define _php3_hash_get_current_data zend_hash_get_current_data -#define _php3_hash_internal_pointer_reset zend_hash_internal_pointer_reset -#define _php3_hash_internal_pointer_end zend_hash_internal_pointer_end - -#define _php3_hash_copy zend_hash_copy -#define _php3_hash_merge zend_hash_merge -#define _php3_hash_sort zend_hash_sort -#define _php3_hash_minmax zend_hash_minmax - -#define _php3_hash_num_elements zend_hash_num_elements - -#define _php3_hash_apply zend_hash_apply -#define _php3_hash_apply_with_argument zend_hash_apply_with_argument - - -#define php3_error php_error - -#define php3_printf php_printf -#define _php3_sprintf php_sprintf - - - -#define php3_module_entry zend_module_entry - -#define php3_strndup zend_strndup -#define php3_str_tolower zend_str_tolower -#define php3_binary_strcmp zend_binary_strcmp - - -#define php3_list_insert zend_list_insert -#define php3_list_find zend_list_find -#define php3_list_delete zend_list_delete - -#define php3_plist_insert zend_plist_insert -#define php3_plist_find zend_plist_find -#define php3_plist_delete zend_plist_delete - -#define zend_print_pval zend_print_zval -#define zend_print_pval_r zend_print_zval_r - - -#define function_entry zend_function_entry - -#define _php3_addslashes php_addslashes -#define _php3_stripslashes php_stripslashes -#define php3_dl php_dl - -#define getParameters zend_get_parameters -#define getParametersArray zend_get_parameters_array - -#define list_entry zend_rsrc_list_entry - -#endif /* PHP3_COMPAT_H */ -- 2.40.0