2 Aug
2023
2 Aug
'23
5:49 p.m.
On Wed Aug 2 17:46:59 2023 +0000, Gabriel Ivăncescu wrote:
In that case, `unlink_ref` isn't going to work either because it NULLs it out, and that would return a NULL VT_DISPATCH in get_nodeValue, which is not exactly ideal, unless I'm missing something? Probably it would need to be something like: ```c if(V_VT(v) != VT_DISPATCH) { VariantClear(v); return; } V_VT(v) = VT_EMPTY; if(V_DISPATCH(v)) IDispatch_Release(V_DISPATCH(v)); ``` Basically like VariantClear, except it puts VT_EMPTY first before releasing, what do you think? Actually in this case I should do same with VT_UNKNOWN. Or I could simplify it to:
VARIANT tmp = *v;
V_VT(v) = VT_EMPTY;
VariantClear(&tmp);
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3482#note_41100