April 1, 2026
8:09 p.m.
Skip VariantCopyInd and VariantClear when both source and destination are simple scalar types (VT_I2, VT_I4, VT_R8, VT_BOOL, VT_EMPTY, etc.) that require no memory management. A direct struct assignment suffices for these types. This avoids two cross-DLL calls into oleaut32 for every integer or float variable assignment. The fast path covers VT_EMPTY through VT_UINT (19 types) excluding VT_BSTR, VT_DISPATCH, VT_UNKNOWN, VT_VARIANT, and VT_RECORD which need refcounting or deep copy. Types with VT_BYREF or VT_ARRAY flags always take the slow path. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10541