Use zend_class_entry/zend_function type names instead of _zend_class_entry/_zend_function tags.

This commit is contained in:
Dmitry Stogov 2018-08-22 14:01:14 +03:00
parent 6c4528e444
commit 93f9ee7217
12 changed files with 40 additions and 40 deletions

View File

@ -110,7 +110,7 @@ typedef struct _zend_trait_alias {
struct _zend_class_entry {
char type;
zend_string *name;
struct _zend_class_entry *parent;
zend_class_entry *parent;
int refcount;
uint32_t ce_flags;
@ -123,19 +123,19 @@ struct _zend_class_entry {
HashTable properties_info;
HashTable constants_table;
union _zend_function *constructor;
union _zend_function *destructor;
union _zend_function *clone;
union _zend_function *__get;
union _zend_function *__set;
union _zend_function *__unset;
union _zend_function *__isset;
union _zend_function *__call;
union _zend_function *__callstatic;
union _zend_function *__tostring;
union _zend_function *__debugInfo;
union _zend_function *serialize_func;
union _zend_function *unserialize_func;
zend_function *constructor;
zend_function *destructor;
zend_function *clone;
zend_function *__get;
zend_function *__set;
zend_function *__unset;
zend_function *__isset;
zend_function *__call;
zend_function *__callstatic;
zend_function *__tostring;
zend_function *__debugInfo;
zend_function *serialize_func;
zend_function *unserialize_func;
/* allocated only if class implements Iterator or IteratorAggregate interface */
zend_class_iterator_funcs *iterator_funcs_ptr;
@ -146,7 +146,7 @@ struct _zend_class_entry {
int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type); /* a class implements this interface */
};
zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref);
union _zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method);
zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method);
/* serializer callbacks */
int (*serialize)(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data);

View File

@ -1348,7 +1348,7 @@ ZEND_FUNCTION(method_exists)
zend_string_release_ex(lcname, 0);
RETURN_TRUE;
} else {
union _zend_function *func = NULL;
zend_function *func = NULL;
if (Z_TYPE_P(klass) == IS_OBJECT
&& Z_OBJ_HT_P(klass)->get_method != NULL

View File

@ -466,7 +466,7 @@ union _zend_function {
uint32_t fn_flags;
zend_string *function_name;
zend_class_entry *scope;
union _zend_function *prototype;
zend_function *prototype;
uint32_t num_args;
uint32_t required_num_args;
zend_arg_info *arg_info;

View File

@ -60,12 +60,12 @@ struct _zend_object_iterator {
};
typedef struct _zend_class_iterator_funcs {
union _zend_function *zf_new_iterator;
union _zend_function *zf_valid;
union _zend_function *zf_current;
union _zend_function *zf_key;
union _zend_function *zf_next;
union _zend_function *zf_rewind;
zend_function *zf_new_iterator;
zend_function *zf_valid;
zend_function *zf_current;
zend_function *zf_key;
zend_function *zf_next;
zend_function *zf_rewind;
} zend_class_iterator_funcs;
BEGIN_EXTERN_C()

View File

@ -253,10 +253,10 @@ static PHP_FUNCTION(com_method_handler)
INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
static union _zend_function *com_method_get(zend_object **object_ptr, zend_string *name, const zval *key)
static zend_function *com_method_get(zend_object **object_ptr, zend_string *name, const zval *key)
{
zend_internal_function f, *fptr = NULL;
union _zend_function *func;
zend_function *func;
DISPID dummy;
php_com_dotnet_object *obj = (php_com_dotnet_object*)*object_ptr;
@ -388,7 +388,7 @@ static int com_call_method(zend_string *method, zend_object *object, INTERNAL_FU
return ret;
}
static union _zend_function *com_constructor_get(zend_object *object)
static zend_function *com_constructor_get(zend_object *object)
{
php_com_dotnet_object *obj = (php_com_dotnet_object *) object;
static zend_internal_function c, d, v;
@ -401,7 +401,7 @@ static union _zend_function *com_constructor_get(zend_object *object)
f.num_args = 0; \
f.fn_flags = 0; \
f.handler = ZEND_FN(fn); \
return (union _zend_function*)&f;
return (zend_function*)&f;
switch (obj->ce->name->val[0]) {
#if HAVE_MSCOREE_H

View File

@ -314,7 +314,7 @@ static HashTable *saproxy_properties_get(zval *object)
return NULL;
}
static union _zend_function *saproxy_method_get(zend_object **object, zend_string *name, const zval *key)
static zend_function *saproxy_method_get(zend_object **object, zend_string *name, const zval *key)
{
/* no methods */
return NULL;
@ -325,7 +325,7 @@ static int saproxy_call_method(zend_string *method, zend_object *object, INTERNA
return FAILURE;
}
static union _zend_function *saproxy_constructor_get(zend_object *object)
static zend_function *saproxy_constructor_get(zend_object *object)
{
/* user cannot instantiate */
return NULL;

View File

@ -610,7 +610,7 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
/* "prototype" may be undefined if "scope" isn't set */
if (op_array->scope && op_array->prototype) {
if ((persist_ptr = zend_shared_alloc_get_xlat_entry(op_array->prototype))) {
op_array->prototype = (union _zend_function*)persist_ptr;
op_array->prototype = (zend_function*)persist_ptr;
}
} else {
op_array->prototype = NULL;

View File

@ -1335,7 +1335,7 @@ int pdo_hash_methods(pdo_dbh_object_t *dbh_obj, int kind)
return 1;
}
static union _zend_function *dbh_method_get(zend_object **object, zend_string *method_name, const zval *key)
static zend_function *dbh_method_get(zend_object **object, zend_string *method_name, const zval *key)
{
zend_function *fbc = NULL;
pdo_dbh_object_t *dbh_obj = php_pdo_dbh_fetch_object(*object);

View File

@ -2213,7 +2213,7 @@ static void dbstmt_prop_delete(zval *object, zval *member, void **cache_slot)
}
}
static union _zend_function *dbstmt_method_get(zend_object **object_pp, zend_string *method_name, const zval *key)
static zend_function *dbstmt_method_get(zend_object **object_pp, zend_string *method_name, const zval *key)
{
zend_function *fbc = NULL;
zend_string *lc_method_name;
@ -2625,7 +2625,7 @@ static HashTable *row_get_properties(zval *object)
return stmt->std.properties;
}
static union _zend_function *row_method_get(
static zend_function *row_method_get(
zend_object **object_pp,
zend_string *method_name, const zval *key)
{
@ -2649,7 +2649,7 @@ static int row_call_method(zend_string *method, zend_object *object, INTERNAL_FU
return FAILURE;
}
static union _zend_function *row_get_ctor(zend_object *object)
static zend_function *row_get_ctor(zend_object *object)
{
zend_throw_exception_ex(php_pdo_get_exception(), 0, "You may not create a PDORow manually");
return NULL;

View File

@ -643,7 +643,7 @@ PHP_MINIT_FUNCTION(soap)
/* Register SoapClient class */
/* BIG NOTE : THIS EMITS AN COMPILATION WARNING UNDER ZE2 - handle_function_call deprecated.
soap_call_function_handler should be of type struct _zend_function, not (*handle_function_call).
soap_call_function_handler should be of type zend_function, not (*handle_function_call).
*/
{
INIT_CLASS_ENTRY(ce, PHP_SOAP_CLIENT_CLASSNAME, soap_client_functions);

View File

@ -882,9 +882,9 @@ SPL_METHOD(RecursiveIteratorIterator, getMaxDepth)
}
} /* }}} */
static union _zend_function *spl_recursive_it_get_method(zend_object **zobject, zend_string *method, const zval *key)
static zend_function *spl_recursive_it_get_method(zend_object **zobject, zend_string *method, const zval *key)
{
union _zend_function *function_handler;
zend_function *function_handler;
spl_recursive_it_object *object = spl_recursive_it_from_obj(*zobject);
zend_long level = object->level;
zval *zobj;
@ -1361,9 +1361,9 @@ static int spl_dual_it_gets_implemented(zend_class_entry *interface, zend_class_
}
#endif
static union _zend_function *spl_dual_it_get_method(zend_object **object, zend_string *method, const zval *key)
static zend_function *spl_dual_it_get_method(zend_object **object, zend_string *method, const zval *key)
{
union _zend_function *function_handler;
zend_function *function_handler;
spl_dual_it_object *intern;
intern = spl_dual_it_from_obj(*object);

View File

@ -86,7 +86,7 @@ static int incomplete_class_has_property(zval *object, zval *member, int check_e
}
/* }}} */
static union _zend_function *incomplete_class_get_method(zend_object **object, zend_string *method, const zval *key) /* {{{ */
static zend_function *incomplete_class_get_method(zend_object **object, zend_string *method, const zval *key) /* {{{ */
{
zval zobject;