summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_handlers.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2004-07-29 14:06:24 +0000
committerWez Furlong <wez@php.net>2004-07-29 14:06:24 +0000
commit7b1d95adba2dc37dbbe8f296839b8b4f382f607a (patch)
tree3221b404acb0ac951901cb08511c2e72eacaef7c /ext/com_dotnet/com_handlers.c
parentff531cca4d361e8ac8614bdae067adda691e2447 (diff)
downloadphp-git-7b1d95adba2dc37dbbe8f296839b8b4f382f607a.tar.gz
Fix my favourite call user func mistake
Diffstat (limited to 'ext/com_dotnet/com_handlers.c')
-rw-r--r--ext/com_dotnet/com_handlers.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c
index cee0b41017..82713c67c7 100644
--- a/ext/com_dotnet/com_handlers.c
+++ b/ext/com_dotnet/com_handlers.c
@@ -321,7 +321,7 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
f.handler = PHP_FN(com_method_handler);
fptr = &f;
-
+
if (obj->typeinfo) {
/* look for byref params */
ITypeComp *comp;
@@ -524,7 +524,7 @@ static int com_object_cast(zval *readobj, zval *writeobj, int type, int should_f
php_com_dotnet_object *obj;
VARIANT v;
VARTYPE vt = VT_EMPTY;
-
+
if (should_free) {
zval_dtor(writeobj);
}
@@ -535,7 +535,6 @@ static int com_object_cast(zval *readobj, zval *writeobj, int type, int should_f
VariantInit(&v);
if (V_VT(&obj->v) == VT_DISPATCH) {
-
if (!obj->have_default_bind && !com_get_default_binding(obj TSRMLS_CC)) {
return FAILURE;
}
@@ -561,9 +560,11 @@ static int com_object_cast(zval *readobj, zval *writeobj, int type, int should_f
case IS_STRING:
vt = VT_BSTR;
break;
+ default:
+ ;
}
- if (vt != VT_EMPTY) {
+ if (vt != VT_EMPTY && vt != V_VT(&v)) {
VariantChangeType(&v, &v, 0, vt);
}