Removed INIT_OVERLOADED_CLASS... macros

This commit is contained in:
Dmitry Stogov 2018-06-29 14:41:35 +03:00
parent d6ab163be8
commit 6e77a60a75
3 changed files with 13 additions and 35 deletions

View file

@ -2878,7 +2878,7 @@ ZEND_API int zend_disable_class(char *class_name, size_t class_name_length) /* {
if (!disabled_class) {
return FAILURE;
}
INIT_CLASS_ENTRY_INIT_METHODS((*disabled_class), disabled_class_new, NULL, NULL, NULL, NULL, NULL);
INIT_CLASS_ENTRY_INIT_METHODS((*disabled_class), disabled_class_new);
disabled_class->create_object = display_disabled_class;
zend_hash_clean(&disabled_class->function_table);
return SUCCESS;

View file

@ -185,18 +185,15 @@ typedef struct _zend_fcall_info_cache {
#endif
#define INIT_CLASS_ENTRY(class_container, class_name, functions) \
INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, NULL, NULL, NULL)
INIT_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions)
#define INIT_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions) \
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, NULL, NULL, NULL, NULL, NULL)
#define INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
{ \
class_container.name = zend_string_init_interned(class_name, class_name_len, 1); \
INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions) \
}
#define INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
#define INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions) \
{ \
class_container.constructor = NULL; \
class_container.destructor = NULL; \
@ -206,16 +203,16 @@ typedef struct _zend_fcall_info_cache {
class_container.create_object = NULL; \
class_container.interface_gets_implemented = NULL; \
class_container.get_static_method = NULL; \
class_container.__call = handle_fcall; \
class_container.__call = NULL; \
class_container.__callstatic = NULL; \
class_container.__tostring = NULL; \
class_container.__get = handle_propget; \
class_container.__set = handle_propset; \
class_container.__unset = handle_propunset; \
class_container.__isset = handle_propisset; \
class_container.__debugInfo = NULL; \
class_container.serialize_func = NULL; \
class_container.unserialize_func = NULL; \
class_container.__get = NULL; \
class_container.__set = NULL; \
class_container.__unset = NULL; \
class_container.__isset = NULL; \
class_container.__debugInfo = NULL; \
class_container.serialize = NULL; \
class_container.unserialize = NULL; \
class_container.parent = NULL; \
class_container.num_interfaces = 0; \
class_container.traits = NULL; \
@ -229,15 +226,9 @@ typedef struct _zend_fcall_info_cache {
class_container.info.internal.builtin_functions = functions; \
}
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions, handle_fcall, handle_propget, handle_propset, NULL, NULL)
#define INIT_NS_CLASS_ENTRY(class_container, ns, class_name, functions) \
INIT_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions)
#define INIT_OVERLOADED_NS_CLASS_ENTRY_EX(class_container, ns, class_name, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, ZEND_NS_NAME(ns, class_name), sizeof(ZEND_NS_NAME(ns, class_name))-1, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset)
#define INIT_OVERLOADED_NS_CLASS_ENTRY(class_container, ns, class_name, functions, handle_fcall, handle_propget, handle_propset) \
INIT_OVERLOADED_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions, handle_fcall, handle_propget, handle_propset)
#ifdef ZTS
# define CE_STATIC_MEMBERS(ce) (((ce)->type==ZEND_USER_CLASS)?(ce)->static_members_table:CG(static_members_table)[(zend_intptr_t)(ce)->static_members_table])

View file

@ -647,20 +647,7 @@ PHP_MINIT_FUNCTION(soap)
soap_call_function_handler should be of type struct _zend_function, not (*handle_function_call).
*/
{
zend_internal_function fe;
fe.type = ZEND_INTERNAL_FUNCTION;
fe.handler = ZEND_MN(SoapClient___call);
fe.function_name = NULL;
fe.scope = NULL;
fe.fn_flags = 0;
fe.prototype = NULL;
fe.num_args = 2;
fe.arg_info = NULL;
zend_set_function_arg_flags((zend_function*)&fe);
INIT_OVERLOADED_CLASS_ENTRY(ce, PHP_SOAP_CLIENT_CLASSNAME, soap_client_functions,
(zend_function *)&fe, NULL, NULL);
INIT_CLASS_ENTRY(ce, PHP_SOAP_CLIENT_CLASSNAME, soap_client_functions);
soap_class_entry = zend_register_internal_class(&ce);
}
/* Register SoapVar class */