summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-08-12 04:31:14 +0000
committerAndi Gutmans <andi@php.net>2001-08-12 04:31:14 +0000
commitff39e51fdf5b17a20b4ac447e66c3048f03c29d3 (patch)
tree7fb854b406b6bf9ead66f3c44cb9c2253888058f
parent1388a3a396140174712929e297d737b381ec29dc (diff)
downloadphp-git-ff39e51fdf5b17a20b4ac447e66c3048f03c29d3.tar.gz
- Make com work with new object model
-rw-r--r--ext/com/com.h12
-rw-r--r--ext/com/conversion.c2
-rw-r--r--ext/rpc/com/com_wrapper.h12
-rw-r--r--ext/rpc/com/conversion.c2
4 files changed, 14 insertions, 14 deletions
diff --git a/ext/com/com.h b/ext/com/com.h
index e1f04c75c7..13ac1d68b8 100644
--- a/ext/com/com.h
+++ b/ext/com/com.h
@@ -21,20 +21,18 @@ typedef struct comval_ {
#define ZVAL_COM(z,o) { \
zval *handle; \
+ HashTable *properties; \
\
- /* OBJECTS_FIXME */ \
- Z_TYPE_P(z) = IS_OBJECT; \
- Z_OBJCE_P(z) = &com_class_entry; \
- \
- ALLOC_HASHTABLE(Z_OBJPROP_P(z)); \
- zend_hash_init(Z_OBJPROP_P(z), 0, NULL, ZVAL_PTR_DTOR, 0); \
+ ALLOC_HASHTABLE(properties); \
+ zend_hash_init(properties, 0, NULL, ZVAL_PTR_DTOR, 0); \
\
ALLOC_ZVAL(handle); \
INIT_PZVAL(handle); \
ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \
\
zval_copy_ctor(handle); \
- zend_hash_index_update(Z_OBJPROP_P(z), 0, &handle, sizeof(zval *), NULL); \
+ zend_hash_index_update(properties, 0, &handle, sizeof(zval *), NULL); \
+ object_and_properties_init(z, &com_class_entry, properties); \
}
#define RETVAL_COM(o) ZVAL_COM(&return_value, o)
diff --git a/ext/com/conversion.c b/ext/com/conversion.c
index cd05ccdb23..0f9bcbd32b 100644
--- a/ext/com/conversion.c
+++ b/ext/com/conversion.c
@@ -758,6 +758,8 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int persistent,
}
else
{
+ TSRMLS_FETCH();
+
ALLOC_COM(obj);
php_COM_set(obj, V_DISPATCH(var_arg), TRUE);
diff --git a/ext/rpc/com/com_wrapper.h b/ext/rpc/com/com_wrapper.h
index e1f04c75c7..13ac1d68b8 100644
--- a/ext/rpc/com/com_wrapper.h
+++ b/ext/rpc/com/com_wrapper.h
@@ -21,20 +21,18 @@ typedef struct comval_ {
#define ZVAL_COM(z,o) { \
zval *handle; \
+ HashTable *properties; \
\
- /* OBJECTS_FIXME */ \
- Z_TYPE_P(z) = IS_OBJECT; \
- Z_OBJCE_P(z) = &com_class_entry; \
- \
- ALLOC_HASHTABLE(Z_OBJPROP_P(z)); \
- zend_hash_init(Z_OBJPROP_P(z), 0, NULL, ZVAL_PTR_DTOR, 0); \
+ ALLOC_HASHTABLE(properties); \
+ zend_hash_init(properties, 0, NULL, ZVAL_PTR_DTOR, 0); \
\
ALLOC_ZVAL(handle); \
INIT_PZVAL(handle); \
ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \
\
zval_copy_ctor(handle); \
- zend_hash_index_update(Z_OBJPROP_P(z), 0, &handle, sizeof(zval *), NULL); \
+ zend_hash_index_update(properties, 0, &handle, sizeof(zval *), NULL); \
+ object_and_properties_init(z, &com_class_entry, properties); \
}
#define RETVAL_COM(o) ZVAL_COM(&return_value, o)
diff --git a/ext/rpc/com/conversion.c b/ext/rpc/com/conversion.c
index cd05ccdb23..0f9bcbd32b 100644
--- a/ext/rpc/com/conversion.c
+++ b/ext/rpc/com/conversion.c
@@ -758,6 +758,8 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int persistent,
}
else
{
+ TSRMLS_FETCH();
+
ALLOC_COM(obj);
php_COM_set(obj, V_DISPATCH(var_arg), TRUE);