Module: wine
Branch: refs/heads/master
Commit: b7bf68f4d00d8e1c6239ad6ef5ce5244bfe4a29e
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b7bf68f4d00d8e1c6239ad6…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Tue Feb 7 16:24:33 2006 +0100
rpcrt4: Don't call IUnknown_AddRef if there is no outer unknown in
StdProxy_Construct as it will just crash anyway.
---
dlls/rpcrt4/cproxy.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c
index 21f23f3..f045e0c 100644
--- a/dlls/rpcrt4/cproxy.c
+++ b/dlls/rpcrt4/cproxy.c
@@ -188,7 +188,11 @@ HRESULT WINAPI StdProxy_Construct(REFIID
This->pChannel = NULL;
*ppProxy = (LPRPCPROXYBUFFER)&This->lpVtbl;
*ppvObj = &This->PVtbl;
- IUnknown_AddRef((IUnknown *)*ppvObj);
+ /* if there is no outer unknown then the caller will control the lifetime
+ * of the proxy object through the proxy buffer, so no need to increment the
+ * ref count of the proxy object */
+ if (pUnkOuter)
+ IUnknown_AddRef((IUnknown *)*ppvObj);
IPSFactoryBuffer_AddRef(pPSFactory);
return S_OK;
Module: wine
Branch: refs/heads/master
Commit: 91da64c9ca12175678be42f24a048c6fb2cef697
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=91da64c9ca12175678be42f…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Tue Feb 7 12:36:20 2006 +0100
widl: Remove '\n' from yyerror calls.
---
tools/widl/parser.y | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 5b24eef..d6f0f6b 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -503,7 +503,7 @@ expr_list_const: expr_const
expr_const: expr { $$ = $1;
if (!$$->is_const)
- yyerror("expression is not constant\n");
+ yyerror("expression is not constant");
}
;
@@ -533,7 +533,7 @@ funcdef:
$4->attrs = $1;
$$ = make_func($4, $6);
if (is_attr($4->attrs, ATTR_IN)) {
- yyerror("Inapplicable attribute");
+ yyerror("inapplicable attribute [in] for function '%s'",$$->def->name);
}
}
;
@@ -625,12 +625,12 @@ dispinterface: tDISPINTERFACE aIDENTIFIE
dispinterfacehdr: attributes dispinterface { attr_t *attrs;
$$ = $2;
- if ($$->defined) yyerror("multiple definition error\n");
+ if ($$->defined) yyerror("multiple definition error");
attrs = make_attr(ATTR_DISPINTERFACE);
LINK(attrs, $1);
$$->attrs = attrs;
$$->ref = find_type("IDispatch", 0);
- if (!$$->ref) yyerror("IDispatch is undefined\n");
+ if (!$$->ref) yyerror("IDispatch is undefined");
$$->defined = TRUE;
if (!parse_only && do_header) write_forward($$);
}
@@ -668,7 +668,7 @@ interface: tINTERFACE aIDENTIFIER { $$
;
interfacehdr: attributes interface { $$ = $2;
- if ($$->defined) yyerror("multiple definition error\n");
+ if ($$->defined) yyerror("multiple definition error");
$$->attrs = $1;
$$->defined = TRUE;
if (!parse_only && do_header) write_forward($$);
@@ -686,7 +686,7 @@ interfacedef: interfacehdr inherit
| interfacehdr ':' aIDENTIFIER
'{' import int_statements '}' { $$ = $1;
$$->ref = find_type2($3, 0);
- if (!$$->ref) yyerror("base class %s not found in import\n", $3);
+ if (!$$->ref) yyerror("base class '%s' not found in import", $3);
$$->funcs = $6;
if (!parse_only && do_header) write_interface($$);
}
@@ -1144,7 +1144,7 @@ static type_t *reg_type(type_t *type, co
struct rtype *nt;
int hash;
if (!name) {
- yyerror("registering named type without name\n");
+ yyerror("registering named type without name");
return type;
}
hash = hash_ident(name);
@@ -1215,7 +1215,7 @@ static type_t *find_type(const char *nam
while (cur && (cur->t != t || strcmp(cur->name, name)))
cur = cur->next;
if (!cur) {
- yyerror("type %s not found\n", name);
+ yyerror("type '%s' not found", name);
return NULL;
}
return cur->type;
@@ -1299,7 +1299,7 @@ static int get_struct_type(var_t *field)
{
has_conformance = 1;
if (PREV_LINK(field))
- yyerror("field %s deriving from a conformant array must be the last field in the structure\n",
+ yyerror("field '%s' deriving from a conformant array must be the last field in the structure",
field->name);
}
if (is_attr(field->attrs, ATTR_LENGTHIS))
@@ -1341,7 +1341,7 @@ static int get_struct_type(var_t *field)
case RPC_FC_CARRAY:
has_conformance = 1;
if (PREV_LINK(field))
- yyerror("field %s deriving from a conformant array must be the last field in the structure\n",
+ yyerror("field '%s' deriving from a conformant array must be the last field in the structure",
field->name);
break;
case RPC_FC_C_CSTRING:
@@ -1363,7 +1363,7 @@ static int get_struct_type(var_t *field)
case RPC_FC_CPSTRUCT:
has_conformance = 1;
if (PREV_LINK(field))
- yyerror("field %s deriving from a conformant array must be the last field in the structure\n",
+ yyerror("field '%s' deriving from a conformant array must be the last field in the structure",
field->name);
has_pointer = 1;
break;
@@ -1371,7 +1371,7 @@ static int get_struct_type(var_t *field)
case RPC_FC_CSTRUCT:
has_conformance = 1;
if (PREV_LINK(field))
- yyerror("field %s deriving from a conformant array must be the last field in the structure\n",
+ yyerror("field '%s' deriving from a conformant array must be the last field in the structure",
field->name);
break;
@@ -1423,7 +1423,7 @@ static var_t *reg_const(var_t *var)
struct rconst *nc;
int hash;
if (!var->name) {
- yyerror("registering constant without name\n");
+ yyerror("registering constant without name");
return var;
}
hash = hash_ident(var->name);
@@ -1441,7 +1441,7 @@ static var_t *find_const(char *name, int
while (cur && strcmp(cur->name, name))
cur = cur->next;
if (!cur) {
- if (f) yyerror("constant %s not found\n", name);
+ if (f) yyerror("constant '%s' not found", name);
return NULL;
}
return cur->var;