Skip to content

Commit 93f9ee7

Browse files
committed
Use zend_class_entry/zend_function type names instead of _zend_class_entry/_zend_function tags.
1 parent 6c4528e commit 93f9ee7

12 files changed

+40
-40
lines changed

Zend/zend.h

+15-15
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ typedef struct _zend_trait_alias {
110110
struct _zend_class_entry {
111111
char type;
112112
zend_string *name;
113-
struct _zend_class_entry *parent;
113+
zend_class_entry *parent;
114114
int refcount;
115115
uint32_t ce_flags;
116116

@@ -123,19 +123,19 @@ struct _zend_class_entry {
123123
HashTable properties_info;
124124
HashTable constants_table;
125125

126-
union _zend_function *constructor;
127-
union _zend_function *destructor;
128-
union _zend_function *clone;
129-
union _zend_function *__get;
130-
union _zend_function *__set;
131-
union _zend_function *__unset;
132-
union _zend_function *__isset;
133-
union _zend_function *__call;
134-
union _zend_function *__callstatic;
135-
union _zend_function *__tostring;
136-
union _zend_function *__debugInfo;
137-
union _zend_function *serialize_func;
138-
union _zend_function *unserialize_func;
126+
zend_function *constructor;
127+
zend_function *destructor;
128+
zend_function *clone;
129+
zend_function *__get;
130+
zend_function *__set;
131+
zend_function *__unset;
132+
zend_function *__isset;
133+
zend_function *__call;
134+
zend_function *__callstatic;
135+
zend_function *__tostring;
136+
zend_function *__debugInfo;
137+
zend_function *serialize_func;
138+
zend_function *unserialize_func;
139139

140140
/* allocated only if class implements Iterator or IteratorAggregate interface */
141141
zend_class_iterator_funcs *iterator_funcs_ptr;
@@ -146,7 +146,7 @@ struct _zend_class_entry {
146146
int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type); /* a class implements this interface */
147147
};
148148
zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref);
149-
union _zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method);
149+
zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method);
150150

151151
/* serializer callbacks */
152152
int (*serialize)(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data);

Zend/zend_builtin_functions.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ ZEND_FUNCTION(method_exists)
13481348
zend_string_release_ex(lcname, 0);
13491349
RETURN_TRUE;
13501350
} else {
1351-
union _zend_function *func = NULL;
1351+
zend_function *func = NULL;
13521352

13531353
if (Z_TYPE_P(klass) == IS_OBJECT
13541354
&& Z_OBJ_HT_P(klass)->get_method != NULL

Zend/zend_compile.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ union _zend_function {
466466
uint32_t fn_flags;
467467
zend_string *function_name;
468468
zend_class_entry *scope;
469-
union _zend_function *prototype;
469+
zend_function *prototype;
470470
uint32_t num_args;
471471
uint32_t required_num_args;
472472
zend_arg_info *arg_info;

Zend/zend_iterators.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ struct _zend_object_iterator {
6060
};
6161

6262
typedef struct _zend_class_iterator_funcs {
63-
union _zend_function *zf_new_iterator;
64-
union _zend_function *zf_valid;
65-
union _zend_function *zf_current;
66-
union _zend_function *zf_key;
67-
union _zend_function *zf_next;
68-
union _zend_function *zf_rewind;
63+
zend_function *zf_new_iterator;
64+
zend_function *zf_valid;
65+
zend_function *zf_current;
66+
zend_function *zf_key;
67+
zend_function *zf_next;
68+
zend_function *zf_rewind;
6969
} zend_class_iterator_funcs;
7070

7171
BEGIN_EXTERN_C()

ext/com_dotnet/com_handlers.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ static PHP_FUNCTION(com_method_handler)
253253
INTERNAL_FUNCTION_PARAM_PASSTHRU);
254254
}
255255

256-
static union _zend_function *com_method_get(zend_object **object_ptr, zend_string *name, const zval *key)
256+
static zend_function *com_method_get(zend_object **object_ptr, zend_string *name, const zval *key)
257257
{
258258
zend_internal_function f, *fptr = NULL;
259-
union _zend_function *func;
259+
zend_function *func;
260260
DISPID dummy;
261261
php_com_dotnet_object *obj = (php_com_dotnet_object*)*object_ptr;
262262

@@ -388,7 +388,7 @@ static int com_call_method(zend_string *method, zend_object *object, INTERNAL_FU
388388
return ret;
389389
}
390390

391-
static union _zend_function *com_constructor_get(zend_object *object)
391+
static zend_function *com_constructor_get(zend_object *object)
392392
{
393393
php_com_dotnet_object *obj = (php_com_dotnet_object *) object;
394394
static zend_internal_function c, d, v;
@@ -401,7 +401,7 @@ static union _zend_function *com_constructor_get(zend_object *object)
401401
f.num_args = 0; \
402402
f.fn_flags = 0; \
403403
f.handler = ZEND_FN(fn); \
404-
return (union _zend_function*)&f;
404+
return (zend_function*)&f;
405405

406406
switch (obj->ce->name->val[0]) {
407407
#if HAVE_MSCOREE_H

ext/com_dotnet/com_saproxy.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ static HashTable *saproxy_properties_get(zval *object)
314314
return NULL;
315315
}
316316

317-
static union _zend_function *saproxy_method_get(zend_object **object, zend_string *name, const zval *key)
317+
static zend_function *saproxy_method_get(zend_object **object, zend_string *name, const zval *key)
318318
{
319319
/* no methods */
320320
return NULL;
@@ -325,7 +325,7 @@ static int saproxy_call_method(zend_string *method, zend_object *object, INTERNA
325325
return FAILURE;
326326
}
327327

328-
static union _zend_function *saproxy_constructor_get(zend_object *object)
328+
static zend_function *saproxy_constructor_get(zend_object *object)
329329
{
330330
/* user cannot instantiate */
331331
return NULL;

ext/opcache/zend_persist.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
610610
/* "prototype" may be undefined if "scope" isn't set */
611611
if (op_array->scope && op_array->prototype) {
612612
if ((persist_ptr = zend_shared_alloc_get_xlat_entry(op_array->prototype))) {
613-
op_array->prototype = (union _zend_function*)persist_ptr;
613+
op_array->prototype = (zend_function*)persist_ptr;
614614
}
615615
} else {
616616
op_array->prototype = NULL;

ext/pdo/pdo_dbh.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ int pdo_hash_methods(pdo_dbh_object_t *dbh_obj, int kind)
13351335
return 1;
13361336
}
13371337

1338-
static union _zend_function *dbh_method_get(zend_object **object, zend_string *method_name, const zval *key)
1338+
static zend_function *dbh_method_get(zend_object **object, zend_string *method_name, const zval *key)
13391339
{
13401340
zend_function *fbc = NULL;
13411341
pdo_dbh_object_t *dbh_obj = php_pdo_dbh_fetch_object(*object);

ext/pdo/pdo_stmt.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2213,7 +2213,7 @@ static void dbstmt_prop_delete(zval *object, zval *member, void **cache_slot)
22132213
}
22142214
}
22152215

2216-
static union _zend_function *dbstmt_method_get(zend_object **object_pp, zend_string *method_name, const zval *key)
2216+
static zend_function *dbstmt_method_get(zend_object **object_pp, zend_string *method_name, const zval *key)
22172217
{
22182218
zend_function *fbc = NULL;
22192219
zend_string *lc_method_name;
@@ -2625,7 +2625,7 @@ static HashTable *row_get_properties(zval *object)
26252625
return stmt->std.properties;
26262626
}
26272627

2628-
static union _zend_function *row_method_get(
2628+
static zend_function *row_method_get(
26292629
zend_object **object_pp,
26302630
zend_string *method_name, const zval *key)
26312631
{
@@ -2649,7 +2649,7 @@ static int row_call_method(zend_string *method, zend_object *object, INTERNAL_FU
26492649
return FAILURE;
26502650
}
26512651

2652-
static union _zend_function *row_get_ctor(zend_object *object)
2652+
static zend_function *row_get_ctor(zend_object *object)
26532653
{
26542654
zend_throw_exception_ex(php_pdo_get_exception(), 0, "You may not create a PDORow manually");
26552655
return NULL;

ext/soap/soap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ PHP_MINIT_FUNCTION(soap)
643643

644644
/* Register SoapClient class */
645645
/* BIG NOTE : THIS EMITS AN COMPILATION WARNING UNDER ZE2 - handle_function_call deprecated.
646-
soap_call_function_handler should be of type struct _zend_function, not (*handle_function_call).
646+
soap_call_function_handler should be of type zend_function, not (*handle_function_call).
647647
*/
648648
{
649649
INIT_CLASS_ENTRY(ce, PHP_SOAP_CLIENT_CLASSNAME, soap_client_functions);

ext/spl/spl_iterators.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -882,9 +882,9 @@ SPL_METHOD(RecursiveIteratorIterator, getMaxDepth)
882882
}
883883
} /* }}} */
884884

885-
static union _zend_function *spl_recursive_it_get_method(zend_object **zobject, zend_string *method, const zval *key)
885+
static zend_function *spl_recursive_it_get_method(zend_object **zobject, zend_string *method, const zval *key)
886886
{
887-
union _zend_function *function_handler;
887+
zend_function *function_handler;
888888
spl_recursive_it_object *object = spl_recursive_it_from_obj(*zobject);
889889
zend_long level = object->level;
890890
zval *zobj;
@@ -1361,9 +1361,9 @@ static int spl_dual_it_gets_implemented(zend_class_entry *interface, zend_class_
13611361
}
13621362
#endif
13631363

1364-
static union _zend_function *spl_dual_it_get_method(zend_object **object, zend_string *method, const zval *key)
1364+
static zend_function *spl_dual_it_get_method(zend_object **object, zend_string *method, const zval *key)
13651365
{
1366-
union _zend_function *function_handler;
1366+
zend_function *function_handler;
13671367
spl_dual_it_object *intern;
13681368

13691369
intern = spl_dual_it_from_obj(*object);

ext/standard/incomplete_class.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int incomplete_class_has_property(zval *object, zval *member, int check_e
8686
}
8787
/* }}} */
8888

89-
static union _zend_function *incomplete_class_get_method(zend_object **object, zend_string *method, const zval *key) /* {{{ */
89+
static zend_function *incomplete_class_get_method(zend_object **object, zend_string *method, const zval *key) /* {{{ */
9090
{
9191
zval zobject;
9292

0 commit comments

Comments
 (0)