Author: cwittich
Date: Sun Sep 14 00:07:16 2008
New Revision: 36207
URL:
http://svn.reactos.org/svn/reactos?rev=36207&view=rev
Log:
Output NULL for inherited methods in the vtbl.
Dan Hipschman <dsh at linux.ucla.edu>
Modified:
trunk/reactos/tools/widl/proxy.c
Modified: trunk/reactos/tools/widl/proxy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/proxy.c?rev=362…
==============================================================================
--- trunk/reactos/tools/widl/proxy.c [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/proxy.c [iso-8859-1] Sun Sep 14 00:07:16 2008
@@ -461,41 +461,45 @@
print_proxy("\n");
}
-static int write_proxy_methods(type_t *iface)
+static int write_proxy_methods(type_t *iface, int skip)
{
const func_t *cur;
int i = 0;
- if (iface->ref) i = write_proxy_methods(iface->ref);
+ if (iface->ref) i = write_proxy_methods(iface->ref, iface->ref->ref !=
NULL);
if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry )
{
var_t *def = cur->def;
if (!is_callas(def->attrs)) {
if (i) fprintf(proxy, ",\n");
- print_proxy( "%s_", iface->name);
+ print_proxy( "%s%s_", skip ? "0\t/* " : "",
iface->name);
write_name(proxy, def);
- fprintf(proxy, "_Proxy");
+ fprintf(proxy, "_Proxy%s", skip ? " */" : "");
i++;
}
}
return i;
}
-static int write_stub_methods(type_t *iface)
+static int write_stub_methods(type_t *iface, int skip)
{
const func_t *cur;
int i = 0;
- if (iface->ref) i = write_stub_methods(iface->ref);
+ if (iface->ref) i = write_stub_methods(iface->ref, TRUE);
else return i; /* skip IUnknown */
if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry )
{
var_t *def = cur->def;
if (!is_local(def->attrs)) {
- if (i) fprintf(proxy,",\n");
- print_proxy( "%s_", iface->name);
- write_name(proxy, def);
- fprintf(proxy, "_Stub");
- i++;
+ if (skip)
+ print_proxy("STUB_FORWARDING_FUNCTION,\n");
+ else {
+ if (i) fprintf(proxy,",\n");
+ print_proxy( "%s_", iface->name);
+ write_name(proxy, def);
+ fprintf(proxy, "_Stub");
+ i++;
+ }
}
}
return i;
@@ -549,7 +553,7 @@
print_proxy( "},\n");
print_proxy( "{\n");
indent++;
- write_proxy_methods(iface);
+ write_proxy_methods(iface, FALSE);
fprintf(proxy, "\n");
indent--;
print_proxy( "}\n");
@@ -561,7 +565,7 @@
print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n",
iface->name);
print_proxy( "{\n");
indent++;
- stubs = write_stub_methods(iface);
+ stubs = write_stub_methods(iface, FALSE);
fprintf(proxy, "\n");
indent--;
fprintf(proxy, "};\n");