mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
Output NULL for inherited methods in the vtbl.
Dan Hipschman <dsh at linux.ucla.edu> svn path=/trunk/; revision=36207
This commit is contained in:
parent
4d2adef5ff
commit
4baaab5def
1 changed files with 17 additions and 13 deletions
|
@ -461,41 +461,45 @@ static void gen_stub(type_t *iface, const func_t *cur, const char *cas,
|
||||||
print_proxy("\n");
|
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;
|
const func_t *cur;
|
||||||
int i = 0;
|
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 ) {
|
if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) {
|
||||||
var_t *def = cur->def;
|
var_t *def = cur->def;
|
||||||
if (!is_callas(def->attrs)) {
|
if (!is_callas(def->attrs)) {
|
||||||
if (i) fprintf(proxy, ",\n");
|
if (i) fprintf(proxy, ",\n");
|
||||||
print_proxy( "%s_", iface->name);
|
print_proxy( "%s%s_", skip ? "0\t/* " : "", iface->name);
|
||||||
write_name(proxy, def);
|
write_name(proxy, def);
|
||||||
fprintf(proxy, "_Proxy");
|
fprintf(proxy, "_Proxy%s", skip ? " */" : "");
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 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;
|
const func_t *cur;
|
||||||
int i = 0;
|
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 */
|
else return i; /* skip IUnknown */
|
||||||
|
|
||||||
if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) {
|
if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) {
|
||||||
var_t *def = cur->def;
|
var_t *def = cur->def;
|
||||||
if (!is_local(def->attrs)) {
|
if (!is_local(def->attrs)) {
|
||||||
if (i) fprintf(proxy,",\n");
|
if (skip)
|
||||||
print_proxy( "%s_", iface->name);
|
print_proxy("STUB_FORWARDING_FUNCTION,\n");
|
||||||
write_name(proxy, def);
|
else {
|
||||||
fprintf(proxy, "_Stub");
|
if (i) fprintf(proxy,",\n");
|
||||||
i++;
|
print_proxy( "%s_", iface->name);
|
||||||
|
write_name(proxy, def);
|
||||||
|
fprintf(proxy, "_Stub");
|
||||||
|
i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
|
@ -549,7 +553,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset)
|
||||||
print_proxy( "},\n");
|
print_proxy( "},\n");
|
||||||
print_proxy( "{\n");
|
print_proxy( "{\n");
|
||||||
indent++;
|
indent++;
|
||||||
write_proxy_methods(iface);
|
write_proxy_methods(iface, FALSE);
|
||||||
fprintf(proxy, "\n");
|
fprintf(proxy, "\n");
|
||||||
indent--;
|
indent--;
|
||||||
print_proxy( "}\n");
|
print_proxy( "}\n");
|
||||||
|
@ -561,7 +565,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset)
|
||||||
print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name);
|
print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name);
|
||||||
print_proxy( "{\n");
|
print_proxy( "{\n");
|
||||||
indent++;
|
indent++;
|
||||||
stubs = write_stub_methods(iface);
|
stubs = write_stub_methods(iface, FALSE);
|
||||||
fprintf(proxy, "\n");
|
fprintf(proxy, "\n");
|
||||||
indent--;
|
indent--;
|
||||||
fprintf(proxy, "};\n");
|
fprintf(proxy, "};\n");
|
||||||
|
|
Loading…
Reference in a new issue