Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9d23f8a7
Commit
9d23f8a7
authored
Aug 05, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Make compare2_values working with NULL BSTR's.
parent
ec25138a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
engine.c
dlls/jscript/engine.c
+6
-1
lang.js
dlls/jscript/tests/lang.js
+2
-0
run.c
dlls/jscript/tests/run.c
+12
-0
No files found.
dlls/jscript/engine.c
View file @
9d23f8a7
...
...
@@ -304,7 +304,12 @@ static HRESULT equal2_values(VARIANT *lval, VARIANT *rval, BOOL *ret)
*
ret
=
V_R8
(
lval
)
==
V_R8
(
rval
);
break
;
case
VT_BSTR
:
*
ret
=
!
strcmpW
(
V_BSTR
(
lval
),
V_BSTR
(
rval
));
if
(
!
V_BSTR
(
lval
))
*
ret
=
SysStringLen
(
V_BSTR
(
rval
))
?
FALSE
:
TRUE
;
else
if
(
!
V_BSTR
(
rval
))
*
ret
=
SysStringLen
(
V_BSTR
(
lval
))
?
FALSE
:
TRUE
;
else
*
ret
=
!
strcmpW
(
V_BSTR
(
lval
),
V_BSTR
(
rval
));
break
;
case
VT_DISPATCH
:
return
disp_cmp
(
V_DISPATCH
(
lval
),
V_DISPATCH
(
rval
),
ret
);
...
...
dlls/jscript/tests/lang.js
View file @
9d23f8a7
...
...
@@ -896,4 +896,6 @@ ok(""+str === "test", "''+str = " + str);
ok
((
function
(){
return
1
;})()
===
1
,
"(function (){return 1;})() = "
+
(
function
(){
return
1
;})());
ok
(
createNullBSTR
()
===
''
,
"createNullBSTR() !== ''"
);
reportSuccess
();
dlls/jscript/tests/run.c
View file @
9d23f8a7
...
...
@@ -73,6 +73,7 @@ DEFINE_EXPECT(GetItemInfo_testVal);
#define DISPID_GLOBAL_OK 0x1004
#define DISPID_GLOBAL_GETVT 0x1005
#define DISPID_GLOBAL_TESTOBJ 0x1006
#define DISPID_GLOBAL_NULL_BSTR 0x1007
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
static
const
CHAR
testA
[]
=
"test"
;
...
...
@@ -283,6 +284,10 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
*
pid
=
DISPID_GLOBAL_TESTOBJ
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"createNullBSTR"
))
{
*
pid
=
DISPID_GLOBAL_NULL_BSTR
;
return
S_OK
;
}
if
(
strict_dispid_check
)
ok
(
0
,
"unexpected call %s
\n
"
,
debugstr_w
(
bstrName
));
...
...
@@ -429,6 +434,13 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
V_VT
(
pvarRes
)
=
VT_DISPATCH
;
V_DISPATCH
(
pvarRes
)
=
(
IDispatch
*
)
&
testObj
;
return
S_OK
;
case
DISPID_GLOBAL_NULL_BSTR
:
if
(
pvarRes
)
{
V_VT
(
pvarRes
)
=
VT_BSTR
;
V_BSTR
(
pvarRes
)
=
NULL
;
}
return
S_OK
;
}
ok
(
0
,
"unexpected call %x
\n
"
,
id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment