summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-07-28 19:11:05 +0000
committerAndi Gutmans <andi@php.net>2001-07-28 19:11:05 +0000
commit13d4670c845821d4dca8c49005669ad1b37a8b88 (patch)
tree1be1b47801b545c784cc28adbf1043f6f29d79ef
parenta0f5b7495e830e25ac1e56c51f4c5b96e8745427 (diff)
downloadphp-git-13d4670c845821d4dca8c49005669ad1b37a8b88.tar.gz
- More object macros
-rw-r--r--ext/wddx/wddx.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index a932965136..bbcc617a50 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -431,6 +431,7 @@ static void php_wddx_serialize_unset(wddx_packet *packet)
*/
static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
{
+/* OBJECTS_FIXME */
zval **ent, *fname, **varname;
zval *retval = NULL;
char *key;
@@ -512,8 +513,9 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
zval_dtor(fname);
FREE_ZVAL(fname);
- if (retval)
+ if (retval) {
zval_ptr_dtor(&retval);
+ }
}
/* }}} */
@@ -784,6 +786,7 @@ static void php_wddx_pop_element(void *user_data, const char *name)
zval *tmp;
TSRMLS_FETCH();
+/* OBJECTS_FIXME */
if (stack->top == 0)
return;
@@ -842,13 +845,14 @@ static void php_wddx_pop_element(void *user_data, const char *name)
object_init_ex(obj, ce);
/* Merge current hashtable with object's default properties */
- zend_hash_merge(obj->value.obj.properties,
+ zend_hash_merge(Z_OBJPROP_P(obj),
Z_ARRVAL_P(ent2->data),
(void (*)(void *)) zval_add_ref,
(void *) &tmp, sizeof(zval *), 0);
- if (incomplete_class)
+ if (incomplete_class) {
php_store_class_name(obj, Z_STRVAL_P(ent1->data), Z_STRLEN_P(ent1->data));
+ }
/* Clean up old array entry */
zval_dtor(ent2->data);
@@ -874,9 +878,9 @@ static void php_wddx_pop_element(void *user_data, const char *name)
}
efree(ent1);
}
- }
- else if (!strcmp(name, EL_VAR) && stack->varname)
+ } else if (!strcmp(name, EL_VAR) && stack->varname) {
efree(stack->varname);
+ }
}
/* }}} */