From 5c5178b2f4c3ec28e1e4d79758dee3e31afe98d4 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sat, 28 Jul 2001 19:23:21 +0000 Subject: [PATCH] - More object macros --- ext/com/com.h | 14 +++++++------- ext/com/conversion.c | 6 +++--- ext/rpc/com/com_wrapper.h | 14 +++++++------- ext/rpc/com/conversion.c | 6 +++--- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ext/com/com.h b/ext/com/com.h index e830c0abb97..e1f04c75c77 100644 --- a/ext/com/com.h +++ b/ext/com/com.h @@ -20,21 +20,21 @@ typedef struct comval_ { } comval; #define ZVAL_COM(z,o) { \ - pval *handle; \ + zval *handle; \ \ + /* OBJECTS_FIXME */ \ Z_TYPE_P(z) = IS_OBJECT; \ - (z)->value.obj.ce = &com_class_entry; \ + Z_OBJCE_P(z) = &com_class_entry; \ \ - ALLOC_HASHTABLE((z)->value.obj.properties); \ - zend_hash_init((z)->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); \ + ALLOC_HASHTABLE(Z_OBJPROP_P(z)); \ + zend_hash_init(Z_OBJPROP_P(z), 0, NULL, ZVAL_PTR_DTOR, 0); \ \ ALLOC_ZVAL(handle); \ INIT_PZVAL(handle); \ ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \ \ - pval_copy_constructor(handle); \ - zend_hash_index_update((z)->value.obj.properties, 0, \ - &handle, sizeof(pval *), NULL); \ + zval_copy_ctor(handle); \ + zend_hash_index_update(Z_OBJPROP_P(z), 0, &handle, sizeof(zval *), NULL); \ } #define RETVAL_COM(o) ZVAL_COM(&return_value, o) diff --git a/ext/com/conversion.c b/ext/com/conversion.c index 6a43604b7c6..90f4f0b82c8 100644 --- a/ext/com/conversion.c +++ b/ext/com/conversion.c @@ -386,7 +386,7 @@ static void pval_to_variant_ex(pval *pval_arg, VARIANT *var_arg, int type, int c pval **var_handle; /* fetch the VARIANT structure */ - zend_hash_index_find(pval_arg->value.obj.properties, 0, (void **) &var_handle); + zend_hash_index_find(Z_OBJPROP_P(pval_arg), 0, (void **) &var_handle); V_VT(var_arg) = VT_VARIANT|VT_BYREF; V_VARIANTREF(var_arg) = (VARIANT FAR*) zend_list_find(Z_LVAL_P(*var_handle), &tp); @@ -900,8 +900,8 @@ static void comval_to_variant(pval *pval_arg, VARIANT *var_arg) int type; /* fetch the comval structure */ - zend_hash_index_find(pval_arg->value.obj.properties, 0, (void **) &comval_handle); - obj = (comval *)zend_list_find(Z_LVAL_P(*comval_handle), &type); + zend_hash_index_find(Z_OBJPROP_P(pval_arg), 0, (void **) &comval_handle); + obj = (comval *) zend_list_find(Z_LVAL_P(*comval_handle), &type); if(!obj || (type != IS_COM) || !C_ISREFD(obj)) { VariantInit(var_arg); diff --git a/ext/rpc/com/com_wrapper.h b/ext/rpc/com/com_wrapper.h index e830c0abb97..e1f04c75c77 100644 --- a/ext/rpc/com/com_wrapper.h +++ b/ext/rpc/com/com_wrapper.h @@ -20,21 +20,21 @@ typedef struct comval_ { } comval; #define ZVAL_COM(z,o) { \ - pval *handle; \ + zval *handle; \ \ + /* OBJECTS_FIXME */ \ Z_TYPE_P(z) = IS_OBJECT; \ - (z)->value.obj.ce = &com_class_entry; \ + Z_OBJCE_P(z) = &com_class_entry; \ \ - ALLOC_HASHTABLE((z)->value.obj.properties); \ - zend_hash_init((z)->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); \ + ALLOC_HASHTABLE(Z_OBJPROP_P(z)); \ + zend_hash_init(Z_OBJPROP_P(z), 0, NULL, ZVAL_PTR_DTOR, 0); \ \ ALLOC_ZVAL(handle); \ INIT_PZVAL(handle); \ ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \ \ - pval_copy_constructor(handle); \ - zend_hash_index_update((z)->value.obj.properties, 0, \ - &handle, sizeof(pval *), NULL); \ + zval_copy_ctor(handle); \ + zend_hash_index_update(Z_OBJPROP_P(z), 0, &handle, sizeof(zval *), NULL); \ } #define RETVAL_COM(o) ZVAL_COM(&return_value, o) diff --git a/ext/rpc/com/conversion.c b/ext/rpc/com/conversion.c index 6a43604b7c6..90f4f0b82c8 100644 --- a/ext/rpc/com/conversion.c +++ b/ext/rpc/com/conversion.c @@ -386,7 +386,7 @@ static void pval_to_variant_ex(pval *pval_arg, VARIANT *var_arg, int type, int c pval **var_handle; /* fetch the VARIANT structure */ - zend_hash_index_find(pval_arg->value.obj.properties, 0, (void **) &var_handle); + zend_hash_index_find(Z_OBJPROP_P(pval_arg), 0, (void **) &var_handle); V_VT(var_arg) = VT_VARIANT|VT_BYREF; V_VARIANTREF(var_arg) = (VARIANT FAR*) zend_list_find(Z_LVAL_P(*var_handle), &tp); @@ -900,8 +900,8 @@ static void comval_to_variant(pval *pval_arg, VARIANT *var_arg) int type; /* fetch the comval structure */ - zend_hash_index_find(pval_arg->value.obj.properties, 0, (void **) &comval_handle); - obj = (comval *)zend_list_find(Z_LVAL_P(*comval_handle), &type); + zend_hash_index_find(Z_OBJPROP_P(pval_arg), 0, (void **) &comval_handle); + obj = (comval *) zend_list_find(Z_LVAL_P(*comval_handle), &type); if(!obj || (type != IS_COM) || !C_ISREFD(obj)) { VariantInit(var_arg);