]> granicus.if.org Git - php/commitdiff
Use zend_class_entry/zend_function type names instead of _zend_class_entry/_zend_func...
authorDmitry Stogov <dmitry@zend.com>
Wed, 22 Aug 2018 11:01:14 +0000 (14:01 +0300)
committerDmitry Stogov <dmitry@zend.com>
Wed, 22 Aug 2018 11:01:14 +0000 (14:01 +0300)
12 files changed:
Zend/zend.h
Zend/zend_builtin_functions.c
Zend/zend_compile.h
Zend/zend_iterators.h
ext/com_dotnet/com_handlers.c
ext/com_dotnet/com_saproxy.c
ext/opcache/zend_persist.c
ext/pdo/pdo_dbh.c
ext/pdo/pdo_stmt.c
ext/soap/soap.c
ext/spl/spl_iterators.c
ext/standard/incomplete_class.c

index 2a6e93c0f26f3e12f3596c14d947db200f3611c9..d303e4c0e54bf76c08373a51aeec2154b40c4a2d 100644 (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);
index 4989b4b5b5324344d40022047c72beb94b5ba644..5b7ecd8c866dd1c8e41c0b26c9f41ea1ce03a6b7 100644 (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
index eead395b23c19b24fd7a48441e68f31c38cf718e..722ad40c1f3ec0db9579ae0b5c49950feeb5c5ca 100644 (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;
index 15c828abd119df25d523fcd406bdccd67a98603c..5991f506bbd100cbb5dae66f30721ac8a3362fd5 100644 (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()
index 8a94d00d6bdb6a1875fd975dbdd74167250addb1..8424c3acfc0fae7f78f5185a1e77d773730938b0 100644 (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
index 68c814f4b4a0efa25bc60def906b1235ca5e4c04..2c7556b5f9ab864b8ba7b77081c06f8e93928412 100644 (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;
index f7310232e5c73a5a0fb5151ad28153ed2c33788a..9620420ab33bdc3725736a764d5853fd073ce052 100644 (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;
index 8d2286812a4efb6da65166c633ef9885524d55d3..10aa039086ea6ae9e557fd09e3b367343afb296d 100644 (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);
index 689f552fc9b32762cc5fd6c1c1f5c8fcecb6564a..f38d34e36ec4af14b6851a632ed4083d0e552d89 100644 (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;
index d22ed14da1821e1d89519e8824b26d59ac32a8d4..b21273e29735f8bf5eab7d8688e4edb702a9c992 100644 (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);
index 23fa58a4b19caf7fd59ebe6c0d4fbd0c937dcb7f..f1688dbf16f4c3c7c0d4bc0dcdc33dc41b7dded1 100644 (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);
index 120da552e10cdac5267aa869ab9d7f92ec4bb442..943dafaa43008cfdf4983ecececa85abd3f80752 100644 (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;