OLEAUT32: add full multiplication/division support for DECIMAL (in small patches)

Alexandre Julliard julliard at winehq.org
Mon Sep 26 12:51:05 CDT 2005


Alex Villací­s Lasso <a_villacis at palosanto.com> writes:

> Last week I sent the following patches that add DECIMAL support for 
> OLEAUT32:
> 1) Tests for all missing functionality: 
> http://www.winehq.org/pipermail/wine-patches/2005-September/020849.html
> 2) Call VarDecDiv and VarDecSub from variant.c: 
> http://www.winehq.org/pipermail/wine-patches/2005-September/020850.html
> 3) Correct scaling of high 32 bits of DECIMAL: 
> http://www.winehq.org/pipermail/wine-patches/2005-September/020851.html
> 4) Add full VarBstrFromDec support: 
> http://www.winehq.org/pipermail/wine-patches/2005-September/020852.html
> 5) Add full VarDecMul support: 
> http://www.winehq.org/pipermail/wine-patches/2005-September/020853.html
> 6) Add full VarDecDiv support: 
> http://www.winehq.org/pipermail/wine-patches/2005-September/020854.html
>
> Of these, only patches 2 and 3 have been commited.
>
> Could somebody explain (especially Mr. Alexandre Julliard) whether these 
> patches have been noticed? If so, what can be done to improve them?

The main problem I see is you are doing everything with bytes; it
would seem more natural and much more efficient to work with 32-bit
ints.

Also you are using malloc which should be avoided. If you really need
to allocate memory you can use HeapAlloc, but since all the numbers
are fixed size I don't think you should need allocations at all, stack
buffers should work fine.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list