]> granicus.if.org Git - php/commitdiff
- don't use anonymous union
authorMichael Wallner <mike@php.net>
Mon, 12 Jun 2006 18:18:39 +0000 (18:18 +0000)
committerMichael Wallner <mike@php.net>
Mon, 12 Jun 2006 18:18:39 +0000 (18:18 +0000)
main/output.c
main/php_output.h

index bd16e36d87387be1a941afdcd58eacdb9b38286e..ba4469e598a8677e5f2d6483afe7106b84834495 100644 (file)
@@ -486,7 +486,7 @@ PHPAPI php_output_handler *php_output_handler_create_user(zval *output_handler,
                        if (zend_is_callable(output_handler, 0, handler_name)) {
                                handler = php_output_handler_init(handler_name, chunk_size, (flags & ~0xf) | PHP_OUTPUT_HANDLER_USER);
                                ZVAL_ADDREF(output_handler);
-                               handler->user = output_handler;
+                               handler->func.user = output_handler;
                        }
                        zval_ptr_dtor(&handler_name);
                        return handler;
@@ -503,7 +503,7 @@ PHPAPI php_output_handler *php_output_handler_create_internal(zval *name, php_ou
        php_output_handler *handler;
        
        handler = php_output_handler_init(name, chunk_size, (flags & ~0xf) | PHP_OUTPUT_HANDLER_INTERNAL);
-       handler->internal = output_handler;
+       handler->func.internal = output_handler;
        
        return handler;
 }
@@ -679,7 +679,7 @@ PHPAPI void php_output_handler_dtor(php_output_handler *handler TSRMLS_DC)
        zval_ptr_dtor(&handler->name);
        STR_FREE(handler->buffer.data);
        if (handler->flags & PHP_OUTPUT_HANDLER_USER) {
-               zval_ptr_dtor(&handler->user);
+               zval_ptr_dtor(&handler->func.user);
        }
        if (handler->dtor && handler->opaq) {
                handler->dtor(handler->opaq TSRMLS_CC);
@@ -913,7 +913,7 @@ static inline int php_output_handler_op(php_output_handler *handler, php_output_
                        params[0] = &input;
                        params[1] = &flags;
                        
-                       if (    (SUCCESS == call_user_function_ex(CG(function_table), NULL, handler->user, &retval, 2, params, 1, NULL TSRMLS_CC)) &&
+                       if (    (SUCCESS == call_user_function_ex(CG(function_table), NULL, handler->func.user, &retval, 2, params, 1, NULL TSRMLS_CC)) &&
                                                retval && (Z_TYPE_P(retval) != IS_NULL) && (Z_TYPE_P(retval) != IS_BOOL || Z_BVAL_P(retval))) {
                                /* user handler may have returned TRUE */
                                status = PHP_OUTPUT_HANDLER_NO_DATA;
@@ -941,7 +941,7 @@ static inline int php_output_handler_op(php_output_handler *handler, php_output_
                        context->in.used = handler->buffer.used;
                        context->in.free = 0;
                        
-                       if (SUCCESS == handler->internal(&handler->opaq, context)) {
+                       if (SUCCESS == handler->func.internal(&handler->opaq, context)) {
                                if (context->out.used) {
                                        status = PHP_OUTPUT_HANDLER_SUCCESS;
                                } else {
index 0542f94aa656533f51de716978f7b7af83603822..c2a7451dd5747b7aaaccdb49c820a85bd6c0ecba 100644 (file)
@@ -110,7 +110,7 @@ typedef struct _php_output_handler {
        union {
                zval *user;
                php_output_handler_context_func_t internal;
-       };
+       } func;
 } php_output_handler;
 
 ZEND_BEGIN_MODULE_GLOBALS(output)