[PATCH 4/4] vbscript: Implemented Abs(try 2)

Shuai Meng mengshuaicalendr at gmail.com
Thu Jun 26 05:13:52 CDT 2014


2014-06-26 16:08 GMT+08:00 Piotr Caban <piotr.caban at gmail.com>:

> On 06/26/14 06:05, Shuai Meng wrote:
>
>> Hi,
>> I notice that Abs(Null) should return Null according to
>> http://msdn.microsoft.com/en-us/library/307330xe(v=vs.84).aspx
>>
>> In wine source code, NULL is defined as 0 in
>> file dlls/windowscodecs/ungif.h, line 66. I have tried to write like this:
>> 1260     if(V_VT(arg) == VT_NULL) {
>> 1261         V_VT(res) = VT_NULL;
>> 1262         V_NULL(res) = NULL;
>> 1263     }
>>
> In case of VT_NULL variant type there's no need to set variant value. You
> only need to set V_VT(res) to VT_NULL.

Thank you Piotr. I get it.

> You also need to handle res==NULL case here.
>
I guess you mean that I need to handle res==NULL case in branch
if(V_VT(arg) == VT_NULL), right?

There is another problem: though Abs(Null) should return Null according to
http://msdn.microsoft.com/en-us/library/307330xe(v=vs.84).aspx , but I test
it in WINXP, i.e.  when arg == Null, the vbscript code:
Call Abs(Null)
and
dim b
b = Abs(Null)
MsgBox b
 returns an error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20140626/47824eb1/attachment.html>


More information about the wine-devel mailing list