summaryrefslogtreecommitdiff
path: root/ext/com_dotnet
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2003-10-07 15:47:25 +0000
committerZeev Suraski <zeev@php.net>2003-10-07 15:47:25 +0000
commit2cc9511cc703cf617fcf7fa9ca3afb174cd86681 (patch)
treef918707eb3a55fb50bebf9f6d941f23c3c64653e /ext/com_dotnet
parentd16d25b136977d1453c0eb42b50c9a6ec1fb39bc (diff)
downloadphp-git-2cc9511cc703cf617fcf7fa9ca3afb174cd86681.tar.gz
Fix cast callbacks
Diffstat (limited to 'ext/com_dotnet')
-rw-r--r--ext/com_dotnet/com_handlers.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c
index 0b759ecc0e..7a51777023 100644
--- a/ext/com_dotnet/com_handlers.c
+++ b/ext/com_dotnet/com_handlers.c
@@ -445,7 +445,7 @@ static int com_objects_compare(zval *object1, zval *object2 TSRMLS_DC)
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;
@@ -463,12 +463,12 @@ static void com_object_cast(zval *readobj, zval *writeobj, int type, int should_
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);
@@ -495,6 +495,7 @@ static void com_object_cast(zval *readobj, zval *writeobj, int type, int should_
php_com_zval_from_variant(writeobj, &v, obj->code_page TSRMLS_CC);
VariantClear(&v);
+ return SUCCESS;
}
zend_object_handlers php_com_object_handlers = {