Hans Leidekker : wbemprox: Support NULL tests that use equality operators.
Alexandre Julliard
julliard at winehq.org
Mon Nov 20 16:01:35 CST 2017
Module: wine
Branch: master
Commit: b5633cc69b9fb8ff15e631ede40cc49c70027dfc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5633cc69b9fb8ff15e631ede40cc49c70027dfc
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Nov 20 15:07:03 2017 +0100
wbemprox: Support NULL tests that use equality operators.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wbemprox/tests/query.c | 8 +++++++-
dlls/wbemprox/wql.y | 24 ++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
index 083a717..79b09c0 100644
--- a/dlls/wbemprox/tests/query.c
+++ b/dlls/wbemprox/tests/query.c
@@ -106,8 +106,14 @@ static void test_select( IWbemServices *services )
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',' ','w','h','e','r','e',' ',
'a','v','a','i','l','a','b','i','l','i','t','y',' ','=',' ','\'','3','\'',0};
+ static const WCHAR query12[] =
+ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','I','O','S',
+ ' ','W','H','E','R','E',' ','N','A','M','E',' ','<','>',' ','N','U','L','L', 0};
+ static const WCHAR query13[] =
+ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','B','I','O','S',
+ ' ','W','H','E','R','E',' ','N','U','L','L',' ','=',' ','N','A','M','E', 0};
static const WCHAR *test[] = { query1, query2, query3, query4, query5, query6, query7, query8, query9, query10,
- query11 };
+ query11, query12, query13 };
HRESULT hr;
IEnumWbemClassObject *result;
BSTR wql = SysAllocString( wqlW );
diff --git a/dlls/wbemprox/wql.y b/dlls/wbemprox/wql.y
index 98b0378..88da2b9 100644
--- a/dlls/wbemprox/wql.y
+++ b/dlls/wbemprox/wql.y
@@ -414,6 +414,30 @@ expr:
if (!$$)
YYABORT;
}
+ | prop_val TK_EQ TK_NULL
+ {
+ $$ = expr_unary( ctx, $1, OP_ISNULL );
+ if (!$$)
+ YYABORT;
+ }
+ | TK_NULL TK_EQ prop_val
+ {
+ $$ = expr_unary( ctx, $3, OP_ISNULL );
+ if (!$$)
+ YYABORT;
+ }
+ | prop_val TK_NE TK_NULL
+ {
+ $$ = expr_unary( ctx, $1, OP_NOTNULL );
+ if (!$$)
+ YYABORT;
+ }
+ | TK_NULL TK_NE prop_val
+ {
+ $$ = expr_unary( ctx, $3, OP_NOTNULL );
+ if (!$$)
+ YYABORT;
+ }
;
string_val:
More information about the wine-cvs
mailing list