[PATCH] vbscript: Replace custom buffer management code by BSTR based helper.

Jacek Caban jacek at codeweavers.com
Wed Oct 23 04:14:20 CDT 2019


Hi Dmitry,


The problem with using BSTRs is that you need to realloc every time 
something is appended. In cases like [1], the current approach uses one 
heap_alloc and one SysAllocString. You patch would need one 
SysAllocString and 6 reallocation.


That said, I wouldn't mind your approach in general, but I don't think 
it's an improvement over the existing code.


Thanks,

Jacek


[1] 
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/vbscript/tests/regexp.vbs#l224




More information about the wine-devel mailing list