Gerald Pfeifer <gerald(a)pfeifer.com> writes:
> So, I admit I don't really know this code, but looking at it (triggered
> by a warning issued by GCC development versions), I noticed that this
> variable passed by reference is not initialized here.
It's initialized when we return a type, and it doesn't need to be
initialized on NULL return. The code is correct, but you could probably
set the variable to NULL in the caller to silence the warning.
--
Alexandre Julliard
julliard(a)winehq.org
Looking at
RPC_STATUS WINAPI RpcBindingVectorFree( RPC_BINDING_VECTOR** BindingVector )
{
RPC_STATUS status;
ULONG c;
TRACE("(%p)\n", BindingVector);
for (c=0; c<(*BindingVector)->Count; c++) {
status = RpcBindingFree(&(*BindingVector)->BindingH[c]);
}
HeapFree(GetProcessHeap(), 0, *BindingVector);
*BindingVector = NULL;
return RPC_S_OK;
}
we currently always ignore the outcome of RpcBindingFree and return
RPC_S_OK.
However, there is one case where RpcBindingFree returns something
different (which is if *Binding is null when RPC_S_INVALID_BINDING
is returned).
What is the proper way of handling this? Just keeping the code as
is and removing the unused status variable? Breaking the loop once
RpcBindingFree returns something different from RPC_S_OK? Continuing
and returning the first / the last status different from RPC_S_OK?
Gerald
Currently, a vbscript using an identifier that is also a keyword fails
with a parser error. For example:
Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
Set oReg = oLocator.ConnectServer("", "root\default", "", "").Get("StdRegProv")
results in:
0009:fixme:vbscript:parse_script parser failed around L"efault\", \"\", \"\").Get(\"StdRegProv\")\n"
The 'Get' method here causes the parser error as it is also a vbscript
keyword.
This patch treats any token after a '.' as an identifier.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46318
Signed-off-by: Brendan McGrath <brendan(a)redmandi.com>
---
I _think_ this patch is OK - but I don't have a lot of experience with
vbscript. There may be a scenario where a keyword can immediately follow
a '.'.
I've also created the bug linked above (where this patch is
proposed).
dlls/vbscript/lex.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/vbscript/lex.c b/dlls/vbscript/lex.c
index 571854db58e..0d27c2423c7 100644
--- a/dlls/vbscript/lex.c
+++ b/dlls/vbscript/lex.c
@@ -412,7 +412,10 @@ static int parse_next_token(void *lval, parser_ctx_t *ctx)
return parse_numeric_literal(ctx, lval);
if(isalphaW(c)) {
- int ret = check_keywords(ctx);
+ int ret = 0;
+
+ if(ctx->last_token != '.')
+ ret = check_keywords(ctx);
if(!ret)
return parse_identifier(ctx, lval);
if(ret != tREM)
--
2.17.1
Hi,
I myself Denil C Verghese, doing a degree in Bachelors of Technology.
I'm here because of two reasons. Foremost, I would like to be part of this
endeavor. I could go on saying why I liked this community, but it would
make this mail long. Second, I want to be an intern as a part of GSoC 2019.
I've joined the IRC Channels #winehackers and #winehq as @dcv. I've
gone through this guide <https://wiki.winehq.org/Summer_Of_Code/> and other
developer guides. Submitted a small patch(a very small one! 😋). I would
like to know where should I focus like, developing new features or solving
bugs. I'm ready to resolve any mistakes that I may make. Hoping that I
would get some guidance on how to be a part in this.
Thank You,
Denil C Verghese