[OLE] Avoid converting variants if it is not needed
a.pignotti at sssup.it
Thu Mar 1 11:15:28 CST 2012
This patch implements an optimization in an OLE code path: when a
variant argument type is the same as the expected type it will not be
converted, but used as it is.
This patch looks big, but it's basically just the footprint of moving
some code inside an if-else.
The rationale behind this, beside optimization, is that even if MSDN
states that memory used for BSTRs should be allocated using
SysAllocString I've found a code sample that seems to be using plain
HeapAlloc for it. With this optimization such variant is never copied
and so the broken behavior of the application does not cause problems.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8724 bytes
Desc: not available
More information about the wine-patches