From ea118ecb50aefab37a7e253e24b229d66aeeaa46 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 17 Dec 2002 21:05:16 +0000 Subject: [PATCH] Fix the type of the This pointer in the vtbl functions inherited from the base class. --- include/unknwn.h | 6 +++--- tools/widl/header.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/unknwn.h b/include/unknwn.h index 553bc0908a8..c9296bd9bd1 100644 --- a/include/unknwn.h +++ b/include/unknwn.h @@ -136,15 +136,15 @@ struct IClassFactoryVtbl { /*** IUnknown methods ***/ HRESULT (CALLBACK *QueryInterface)( - IUnknown* This, + IClassFactory* This, REFIID riid, void** ppvObject); ULONG (CALLBACK *AddRef)( - IUnknown* This); + IClassFactory* This); ULONG (CALLBACK *Release)( - IUnknown* This); + IClassFactory* This); /*** IClassFactory methods ***/ HRESULT (CALLBACK *CreateInstance)( diff --git a/tools/widl/header.c b/tools/widl/header.c index 81830c912ea..b9c7ddf44cf 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -556,12 +556,12 @@ static void write_cpp_method_def(type_t *iface) } } -static void write_c_method_def(type_t *iface) +static void write_c_method_def(type_t *iface,char *name) { func_t *cur = iface->funcs; while (NEXT_LINK(cur)) cur = NEXT_LINK(cur); - if (iface->ref) write_c_method_def(iface->ref); + if (iface->ref) write_c_method_def(iface->ref,name); indent(0); fprintf(header, "/*** %s methods ***/\n", iface->name); while (cur) { @@ -572,7 +572,7 @@ static void write_c_method_def(type_t *iface) fprintf(header, " (CALLBACK *"); write_name(header, def); fprintf(header, ")(\n"); - write_args(header, cur->args, iface->name, 1); + write_args(header, cur->args, name, 1); fprintf(header, ");\n"); fprintf(header, "\n"); } @@ -724,7 +724,7 @@ void write_com_interface(type_t *iface) indentation++; fprintf(header, " ICOM_MSVTABLE_COMPAT_FIELDS\n"); fprintf(header, "\n"); - write_c_method_def(iface); + write_c_method_def(iface,iface->name); indentation--; fprintf(header, "};\n"); fprintf(header, "\n");