diff options
author | David Eriksson <eriksson@php.net> | 2001-08-12 09:48:07 +0000 |
---|---|---|
committer | David Eriksson <eriksson@php.net> | 2001-08-12 09:48:07 +0000 |
commit | 4fee32fac9ed9bdb9beadbc9f1a0ac99e71ee1bf (patch) | |
tree | 5bca58b70e2c806b18fe25a43c64720283d9c294 | |
parent | 224600786c0d4afb4e4e44689024c6be237d58ae (diff) | |
download | php-git-4fee32fac9ed9bdb9beadbc9f1a0ac99e71ee1bf.tar.gz |
adjusted Satellite for Zend 2
-rw-r--r-- | ext/satellite/class.c | 4 | ||||
-rw-r--r-- | ext/satellite/object.c | 17 | ||||
-rw-r--r-- | ext/satellite/struct.c | 15 | ||||
-rw-r--r-- | ext/satellite/zval_to_namedvalue.c | 4 |
4 files changed, 7 insertions, 33 deletions
diff --git a/ext/satellite/class.c b/ext/satellite/class.c index d258edfc3f..959498e661 100644 --- a/ext/satellite/class.c +++ b/ext/satellite/class.c @@ -138,7 +138,7 @@ void orbit_save_data(zval * php_object, int type, void * data) INIT_PZVAL(orbit_data_handle); /* set reference count */ zend_hash_index_update( - php_object->value.obj.properties, /* hashtable */ + Z_OBJPROP_P(php_object), /* hashtable */ 0, /* hash??? */ &orbit_data_handle, /* data */ sizeof(pval *), /* data size */ @@ -160,7 +160,7 @@ void * orbit_retrieve_data(const zval * php_object, int wanted_type) /* get handle to corba data */ zend_hash_index_find( - php_object->value.obj.properties, /* hash table */ + Z_OBJPROP_P(php_object), /* hash table */ 0, /* hash??? */ (void **)&orbit_data_handle /* data */ ); diff --git a/ext/satellite/object.c b/ext/satellite/object.c index 741a69a834..c0466a945e 100644 --- a/ext/satellite/object.c +++ b/ext/satellite/object.c @@ -179,7 +179,7 @@ static void OrbitObject_Wakeup(INTERNAL_FUNCTION_PARAMETERS) /* find IOR property */ if (zend_hash_find( - this_ptr->value.obj.properties, + Z_OBJPROP_P(this_ptr), IOR_PROPERTY_KEY, sizeof(IOR_PROPERTY_KEY), (void**)&pp_ior) != SUCCESS) @@ -242,20 +242,7 @@ zend_bool OrbitObject_Create(CORBA_Object source, zval * pDestination) goto error; } - /* set zval members */ - pDestination->type = IS_OBJECT; - pDestination->is_ref = 1; - pDestination->refcount = 1; - - pDestination->value.obj.ce = &OrbitObject_class_entry; - pDestination->value.obj.properties = orbit_new(HashTable); - - zend_hash_init( - pDestination->value.obj.properties, /* hash table */ - 0, /* size */ - NULL, /* hash function */ - ZVAL_PTR_DTOR, /* destructor */ - 0); /* persistent */ + object_init_ex(pDestination, &OrbitObject_class_entry); /* save orbit data */ OrbitObject_SaveData(pDestination, p_object); diff --git a/ext/satellite/struct.c b/ext/satellite/struct.c index 47f377e9cd..e7ffbf7daa 100644 --- a/ext/satellite/struct.c +++ b/ext/satellite/struct.c @@ -209,20 +209,7 @@ zend_bool OrbitStruct_Create(const char * pId, zval * pDestination) if (!OrbitStruct_Initialize(pId, p_struct)) goto error; - /* set zval members */ - pDestination->type = IS_OBJECT; - pDestination->is_ref = 1; - pDestination->refcount = 1; - - pDestination->value.obj.ce = &OrbitStruct_class_entry; - pDestination->value.obj.properties = orbit_new(HashTable); - - zend_hash_init( - pDestination->value.obj.properties, /* hash table */ - 0, /* size */ - NULL, /* hash function */ - ZVAL_PTR_DTOR, /* destructor */ - 0); /* persistent */ + object_init_ex(pDestination, &OrbitStruct_class_entry); /* save orbit data */ OrbitStruct_SaveData(pDestination, p_struct); diff --git a/ext/satellite/zval_to_namedvalue.c b/ext/satellite/zval_to_namedvalue.c index 24f7a29821..bfd222c13f 100644 --- a/ext/satellite/zval_to_namedvalue.c +++ b/ext/satellite/zval_to_namedvalue.c @@ -145,7 +145,7 @@ static zend_bool satellite_zval_to_namedvalue_objref(const zval * pSource, goto error; /* see that it's a corba object */ - if (strcmp(pSource->value.obj.ce->name, "OrbitObject") != 0) + if (strcmp(Z_OBJCE_P(pSource)->name, "OrbitObject") != 0) goto error; /* bad class type */ pObject = OrbitObject_RetrieveData(pSource); @@ -308,7 +308,7 @@ static zend_bool satellite_zval_to_namedvalue_struct(const zval * pSource, goto error; /* bad source type */ /* see that it's a structure object */ - if (strcmp(pSource->value.obj.ce->name, "OrbitStruct") != 0) + if (strcmp(Z_OBJCE_P(pSource)->name, "OrbitStruct") != 0) goto error; /* bad class type */ /* get struct info */ |