]> granicus.if.org Git - php/commitdiff
- More Object macro work. I couldn't test this one so let me know if it
authorAndi Gutmans <andi@php.net>
Sat, 28 Jul 2001 18:55:49 +0000 (18:55 +0000)
committerAndi Gutmans <andi@php.net>
Sat, 28 Jul 2001 18:55:49 +0000 (18:55 +0000)
  breaks the Windows build.

ext/com/COM.c
ext/com/VARIANT.c
ext/rpc/com/com_wrapper.c
ext/rpc/com/variant.c

index 35b0ee3e4d407cd2477aa6e8337b325588ceebd3..93762ccd02d58ed98257b5719a1b22cdd273565c 100644 (file)
@@ -1155,7 +1155,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
        ZVAL_NULL(&return_value);
 
        /* fetch the IDispatch interface */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &comval_handle);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &comval_handle);
        obj = (comval *) zend_list_find(Z_LVAL_P(*comval_handle), &type);
        if(!obj || (type != IS_COM))
        {
@@ -1246,7 +1246,7 @@ PHPAPI int php_COM_set_property_handler(zend_property_reference *property_refere
 
 
        /* fetch the IDispatch interface */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &comval_handle);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &comval_handle);
        obj = (comval *)zend_list_find(Z_LVAL_P(*comval_handle), &type);
        if(!obj || (type != IS_COM))
        {
@@ -1319,7 +1319,7 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
                *object_handle = *return_value;
                pval_copy_constructor(object_handle);
                INIT_PZVAL(object_handle);
-               zend_hash_index_update(object->value.obj.properties, 0, &object_handle, sizeof(pval *), NULL);
+               zend_hash_index_update(Z_OBJPROP_P(object), 0, &object_handle, sizeof(pval *), NULL);
                pval_destructor(&function_name->element);
 
                return;
@@ -1335,8 +1335,8 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
                pval_destructor(&function_name->element);
                return;
        }
-       zend_hash_index_find(property.value.obj.properties, 0, (void **) &handle);
-       obj = (comval *)zend_list_find((*handle)->value.lval,&type);
+       zend_hash_index_find(Z_OBJPROP(property), 0, (void **) &handle);
+       obj = (comval *)zend_list_find(Z_LVAL_PP(handle), &type);
 
        if(!obj || (type != IS_COM))
        {
@@ -1674,8 +1674,8 @@ PHP_FUNCTION(com_isenum)
        getParameters(ht, 1, &object);
 
        /* obtain IDispatch interface */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &comval_handle);
-       obj = (comval *) zend_list_find((*comval_handle)->value.lval, &type);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &comval_handle);
+       obj = (comval *) zend_list_find(Z_LVAL_PP(comval_handle), &type);
        if(!obj || (type != IS_COM))
        {
                php_error(E_WARNING,"%s is not a COM object handler", "");
index 49a7335ca07efc88c34e5d8dd4ac44b4600103d9..9eaca8d23bf19318eebe884561aef4c36b6fe0e8 100644 (file)
@@ -169,8 +169,8 @@ void php_VARIANT_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_proper
                *object_handle = *return_value;
                pval_copy_constructor(object_handle);
                INIT_PZVAL(object_handle);
-               zend_hash_index_update(object->value.obj.properties, 0, &object_handle, sizeof(pval *), NULL);
-               pval_destructor(&function_name->element);
+               zend_hash_index_update(Z_OBJPROP_P(object), 0, &object_handle, sizeof(pval *), NULL);
+               zval_dtor(&function_name->element);
        }
 }
 
@@ -184,7 +184,7 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc
        VARIANT *var_arg;
 
        /* fetch the VARIANT structure */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &var_handle);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &var_handle);
        var_arg = zend_list_find(Z_LVAL_PP(var_handle), &type);
 
        if(!var_arg || (type != IS_VARIANT))
@@ -220,7 +220,7 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc
                                php_error(E_WARNING, "Unknown method.");
                                break;
 
-                               pval_destructor(&overloaded_property->element);
+                               zval_dtor(&overloaded_property->element);
                }
        }
 
@@ -236,7 +236,7 @@ int php_VARIANT_set_property_handler(zend_property_reference *property_reference
        VARIANT *var_arg;
 
        /* fetch the VARIANT structure */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &var_handle);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &var_handle);
        var_arg = zend_list_find(Z_LVAL_PP(var_handle), &type);
 
        if(!var_arg || (type != IS_VARIANT))
@@ -244,7 +244,7 @@ int php_VARIANT_set_property_handler(zend_property_reference *property_reference
 
        overloaded_property = (zend_overloaded_element *) property_reference->elements_list->head->data;
        do_VARIANT_propset(var_arg, &overloaded_property->element, value);
-       pval_destructor(&overloaded_property->element);
+       zval_dtor(&overloaded_property->element);
        return SUCCESS;
 }
 
index 35b0ee3e4d407cd2477aa6e8337b325588ceebd3..93762ccd02d58ed98257b5719a1b22cdd273565c 100644 (file)
@@ -1155,7 +1155,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
        ZVAL_NULL(&return_value);
 
        /* fetch the IDispatch interface */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &comval_handle);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &comval_handle);
        obj = (comval *) zend_list_find(Z_LVAL_P(*comval_handle), &type);
        if(!obj || (type != IS_COM))
        {
@@ -1246,7 +1246,7 @@ PHPAPI int php_COM_set_property_handler(zend_property_reference *property_refere
 
 
        /* fetch the IDispatch interface */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &comval_handle);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &comval_handle);
        obj = (comval *)zend_list_find(Z_LVAL_P(*comval_handle), &type);
        if(!obj || (type != IS_COM))
        {
@@ -1319,7 +1319,7 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
                *object_handle = *return_value;
                pval_copy_constructor(object_handle);
                INIT_PZVAL(object_handle);
-               zend_hash_index_update(object->value.obj.properties, 0, &object_handle, sizeof(pval *), NULL);
+               zend_hash_index_update(Z_OBJPROP_P(object), 0, &object_handle, sizeof(pval *), NULL);
                pval_destructor(&function_name->element);
 
                return;
@@ -1335,8 +1335,8 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
                pval_destructor(&function_name->element);
                return;
        }
-       zend_hash_index_find(property.value.obj.properties, 0, (void **) &handle);
-       obj = (comval *)zend_list_find((*handle)->value.lval,&type);
+       zend_hash_index_find(Z_OBJPROP(property), 0, (void **) &handle);
+       obj = (comval *)zend_list_find(Z_LVAL_PP(handle), &type);
 
        if(!obj || (type != IS_COM))
        {
@@ -1674,8 +1674,8 @@ PHP_FUNCTION(com_isenum)
        getParameters(ht, 1, &object);
 
        /* obtain IDispatch interface */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &comval_handle);
-       obj = (comval *) zend_list_find((*comval_handle)->value.lval, &type);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &comval_handle);
+       obj = (comval *) zend_list_find(Z_LVAL_PP(comval_handle), &type);
        if(!obj || (type != IS_COM))
        {
                php_error(E_WARNING,"%s is not a COM object handler", "");
index 49a7335ca07efc88c34e5d8dd4ac44b4600103d9..9eaca8d23bf19318eebe884561aef4c36b6fe0e8 100644 (file)
@@ -169,8 +169,8 @@ void php_VARIANT_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_proper
                *object_handle = *return_value;
                pval_copy_constructor(object_handle);
                INIT_PZVAL(object_handle);
-               zend_hash_index_update(object->value.obj.properties, 0, &object_handle, sizeof(pval *), NULL);
-               pval_destructor(&function_name->element);
+               zend_hash_index_update(Z_OBJPROP_P(object), 0, &object_handle, sizeof(pval *), NULL);
+               zval_dtor(&function_name->element);
        }
 }
 
@@ -184,7 +184,7 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc
        VARIANT *var_arg;
 
        /* fetch the VARIANT structure */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &var_handle);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &var_handle);
        var_arg = zend_list_find(Z_LVAL_PP(var_handle), &type);
 
        if(!var_arg || (type != IS_VARIANT))
@@ -220,7 +220,7 @@ pval php_VARIANT_get_property_handler(zend_property_reference *property_referenc
                                php_error(E_WARNING, "Unknown method.");
                                break;
 
-                               pval_destructor(&overloaded_property->element);
+                               zval_dtor(&overloaded_property->element);
                }
        }
 
@@ -236,7 +236,7 @@ int php_VARIANT_set_property_handler(zend_property_reference *property_reference
        VARIANT *var_arg;
 
        /* fetch the VARIANT structure */
-       zend_hash_index_find(object->value.obj.properties, 0, (void **) &var_handle);
+       zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &var_handle);
        var_arg = zend_list_find(Z_LVAL_PP(var_handle), &type);
 
        if(!var_arg || (type != IS_VARIANT))
@@ -244,7 +244,7 @@ int php_VARIANT_set_property_handler(zend_property_reference *property_reference
 
        overloaded_property = (zend_overloaded_element *) property_reference->elements_list->head->data;
        do_VARIANT_propset(var_arg, &overloaded_property->element, value);
-       pval_destructor(&overloaded_property->element);
+       zval_dtor(&overloaded_property->element);
        return SUCCESS;
 }