return ret;
}
-static void com_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
+static int com_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
{
php_com_dotnet_object *obj;
VARIANT v;
if (V_VT(&obj->v) == VT_DISPATCH) {
if (!obj->have_default_bind && !com_get_default_binding(obj TSRMLS_CC)) {
- return;
+ return FAILURE;
}
if (FAILURE == php_com_do_invoke_by_id(obj, obj->default_bind,
DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, 0, NULL TSRMLS_CC)) {
- return;
+ return FAILURE;
}
} else {
VariantCopy(&v, &obj->v);
php_com_zval_from_variant(writeobj, &v, obj->code_page TSRMLS_CC);
VariantClear(&v);
+ return SUCCESS;
}
zend_object_handlers php_com_object_handlers = {
/* {{{ cast_object()
*/
-static void
+static int
cast_object(zval *object, int type, char *contents TSRMLS_DC)
{
if (contents) {
case IS_DOUBLE:
convert_to_double(object);
break;
+ default:
+ return FAILURE;
}
+ return SUCCESS;
}
/* }}} */
/* {{{ sxe_object_cast()
*/
-static void
+static int
sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
{
php_sxe_object *sxe;
char *contents = NULL;
zval free_obj;
+ int rv;
sxe = php_sxe_fetch_object(readobj TSRMLS_CC);
if (should_free) {
}
}
- cast_object(writeobj, type, contents TSRMLS_CC);
+ rv = cast_object(writeobj, type, contents TSRMLS_CC);
if (contents) {
xmlFree(contents);
if (should_free) {
zval_dtor(&free_obj);
}
+ return rv;
}
/* }}} */