Skip to content

Commit 6e77a60

Browse files
committed
Removed INIT_OVERLOADED_CLASS... macros
1 parent d6ab163 commit 6e77a60

File tree

3 files changed

+13
-35
lines changed

3 files changed

+13
-35
lines changed

Zend/zend_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,7 @@ ZEND_API int zend_disable_class(char *class_name, size_t class_name_length) /* {
28782878
if (!disabled_class) {
28792879
return FAILURE;
28802880
}
2881-
INIT_CLASS_ENTRY_INIT_METHODS((*disabled_class), disabled_class_new, NULL, NULL, NULL, NULL, NULL);
2881+
INIT_CLASS_ENTRY_INIT_METHODS((*disabled_class), disabled_class_new);
28822882
disabled_class->create_object = display_disabled_class;
28832883
zend_hash_clean(&disabled_class->function_table);
28842884
return SUCCESS;

Zend/zend_API.h

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,15 @@ typedef struct _zend_fcall_info_cache {
185185
#endif
186186

187187
#define INIT_CLASS_ENTRY(class_container, class_name, functions) \
188-
INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, NULL, NULL, NULL)
188+
INIT_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions)
189189

190190
#define INIT_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions) \
191-
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, NULL, NULL, NULL, NULL, NULL)
192-
193-
#define INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
194191
{ \
195192
class_container.name = zend_string_init_interned(class_name, class_name_len, 1); \
196-
INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
193+
INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions) \
197194
}
198195

199-
#define INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
196+
#define INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions) \
200197
{ \
201198
class_container.constructor = NULL; \
202199
class_container.destructor = NULL; \
@@ -206,16 +203,16 @@ typedef struct _zend_fcall_info_cache {
206203
class_container.create_object = NULL; \
207204
class_container.interface_gets_implemented = NULL; \
208205
class_container.get_static_method = NULL; \
209-
class_container.__call = handle_fcall; \
206+
class_container.__call = NULL; \
210207
class_container.__callstatic = NULL; \
211208
class_container.__tostring = NULL; \
212-
class_container.__get = handle_propget; \
213-
class_container.__set = handle_propset; \
214-
class_container.__unset = handle_propunset; \
215-
class_container.__isset = handle_propisset; \
216-
class_container.__debugInfo = NULL; \
217-
class_container.serialize_func = NULL; \
218-
class_container.unserialize_func = NULL; \
209+
class_container.__get = NULL; \
210+
class_container.__set = NULL; \
211+
class_container.__unset = NULL; \
212+
class_container.__isset = NULL; \
213+
class_container.__debugInfo = NULL; \
214+
class_container.serialize = NULL; \
215+
class_container.unserialize = NULL; \
219216
class_container.parent = NULL; \
220217
class_container.num_interfaces = 0; \
221218
class_container.traits = NULL; \
@@ -229,15 +226,9 @@ typedef struct _zend_fcall_info_cache {
229226
class_container.info.internal.builtin_functions = functions; \
230227
}
231228

232-
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \
233-
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions, handle_fcall, handle_propget, handle_propset, NULL, NULL)
234229

235230
#define INIT_NS_CLASS_ENTRY(class_container, ns, class_name, functions) \
236231
INIT_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions)
237-
#define INIT_OVERLOADED_NS_CLASS_ENTRY_EX(class_container, ns, class_name, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
238-
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)
239-
#define INIT_OVERLOADED_NS_CLASS_ENTRY(class_container, ns, class_name, functions, handle_fcall, handle_propget, handle_propset) \
240-
INIT_OVERLOADED_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions, handle_fcall, handle_propget, handle_propset)
241232

242233
#ifdef ZTS
243234
# 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])

ext/soap/soap.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -647,20 +647,7 @@ PHP_MINIT_FUNCTION(soap)
647647
soap_call_function_handler should be of type struct _zend_function, not (*handle_function_call).
648648
*/
649649
{
650-
zend_internal_function fe;
651-
652-
fe.type = ZEND_INTERNAL_FUNCTION;
653-
fe.handler = ZEND_MN(SoapClient___call);
654-
fe.function_name = NULL;
655-
fe.scope = NULL;
656-
fe.fn_flags = 0;
657-
fe.prototype = NULL;
658-
fe.num_args = 2;
659-
fe.arg_info = NULL;
660-
zend_set_function_arg_flags((zend_function*)&fe);
661-
662-
INIT_OVERLOADED_CLASS_ENTRY(ce, PHP_SOAP_CLIENT_CLASSNAME, soap_client_functions,
663-
(zend_function *)&fe, NULL, NULL);
650+
INIT_CLASS_ENTRY(ce, PHP_SOAP_CLIENT_CLASSNAME, soap_client_functions);
664651
soap_class_entry = zend_register_internal_class(&ce);
665652
}
666653
/* Register SoapVar class */

0 commit comments

Comments
 (0)