cvs: php4(PHP_4_0_7) /ext/com COM.c TODO conversion.c

From: Date: Mon, 10 Sep 2001 09:28:54 +0000
Subject: cvs: php4(PHP_4_0_7) /ext/com COM.c TODO conversion.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7363@lists.php.net to get a copy of this message
phanto Mon Sep 10 05:28:54 2001 EDT Removed files: (Branch: PHP_4_0_7) /php4/ext/com TODO Modified files: /php4/ext/com COM.c conversion.c Log: MFH Index: php4/ext/com/COM.c diff -u php4/ext/com/COM.c:1.50.2.2 php4/ext/com/COM.c:1.50.2.3 --- php4/ext/com/COM.c:1.50.2.2 Sat Sep 8 17:02:34 2001 +++ php4/ext/com/COM.c Mon Sep 10 05:28:54 2001 @@ -511,6 +511,12 @@ /* @todo if (server_name) */ if (!server_name) { + /* @todo shouldn't the bind context be fetched on module startup and kept as a global shared instance ? + * all calls to BindToObject would deliver the same instance then (as desired) + * IBindCtx::RegisterObjectBound() should be called then after mkparsedisplayname() + * + * @todo use mkparsedisplaynameex() ? + */ if (SUCCEEDED(hr = CreateBindCtx(0, &pBindCtx))) { if (SUCCEEDED(hr = MkParseDisplayName(pBindCtx, ProgID, &ulEaten, &pMoniker))) { hr = pMoniker->lpVtbl->BindToObject(pMoniker, pBindCtx, NULL, &IID_IDispatch, (LPVOID *) &C_DISPATCH(obj)); @@ -742,7 +748,11 @@ efree(funcname); for (current_arg=0;current_arg<arg_count;current_arg++) { - VariantClear(&variant_args[current_arg]); + /* don't release IDispatch pointers as they are used afterwards */ + if (V_VT(&variant_args[current_arg]) != VT_DISPATCH) { + /* @todo review this: what happens to an array of IDispatchs or a VARIANT->IDispatch */ + VariantClear(&variant_args[current_arg]); + } } efree(variant_args); Index: php4/ext/com/conversion.c diff -u php4/ext/com/conversion.c:1.33.2.2 php4/ext/com/conversion.c:1.33.2.3 --- php4/ext/com/conversion.c:1.33.2.2 Mon Aug 20 04:56:12 2001 +++ php4/ext/com/conversion.c Mon Sep 10 05:28:54 2001 @@ -86,7 +86,7 @@ } if (pval_arg->is_ref) { /* deprecated, implemented for downwards compatiblity */ - type |= VT_BYREF; +// type |= VT_BYREF; } pval_to_variant_ex(pval_arg, var_arg, type, codepage TSRMLS_CC); @@ -452,7 +452,7 @@ ZVAL_NULL(pval_arg); return FAILURE; } - SafeArrayLock( array); + SafeArrayLock(array); /* This call has failed for everything I have tried */ /* But best leave it to be on the safe side */

« previous php.cvs (#7363) next »