static zend_object_value php_sxe_register_object(php_sxe_object * TSRMLS_DC);
static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data TSRMLS_DC);
static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data TSRMLS_DC);
+static zval *sxe_get_value(zval *z TSRMLS_DC);
/* {{{ _node_as_zval()
*/
int is_attr = 0;
int nodendx = 0;
int test = 0;
+ int new_value = 0;
long cnt;
zval tmp_zv, trim_zv, value_copy;
break;
case IS_STRING:
break;
+ case IS_OBJECT:
+ if (Z_OBJCE_P(value) == sxe_class_entry) {
+ value = sxe_get_value(value TSRMLS_CC);
+ INIT_PZVAL(value);
+ new_value = 1;
+ break;
+ }
+ /* break is missing intentionally */
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "It is not yet possible to assign complex types to %s", attribs ? "attributes" : "properties");
+ return;
}
}
if (value && value == &value_copy) {
zval_dtor(value);
}
+ if (new_value) {
+ zval_ptr_dtor(&value);
+ }
}
/* }}} */