widl: Fix ExprEvalRoutines output.

This commit is contained in:
Dan Hipschman 2007-10-26 15:33:13 -07:00 committed by Alexandre Julliard
parent e8eaee4f6a
commit 70e12b31b8
3 changed files with 17 additions and 18 deletions

View File

@ -386,6 +386,7 @@ static void init_client(void)
void write_client(ifref_list_t *ifaces)
{
unsigned int proc_offset = 0;
int expr_eval_routines;
ifref_t *iface;
if (!do_client)
@ -398,6 +399,10 @@ void write_client(ifref_list_t *ifaces)
return;
write_formatstringsdecl(client, indent, ifaces, need_stub);
expr_eval_routines = write_expr_eval_routines(client, client_token);
if (expr_eval_routines)
write_expr_eval_routine_list(client, client_token);
write_user_quad_list(client);
if (ifaces) LIST_FOR_EACH_ENTRY( iface, ifaces, ifref_t, entry )
{
@ -411,8 +416,6 @@ void write_client(ifref_list_t *ifaces)
if (iface->iface->funcs)
{
int expr_eval_routines;
write_implicithandledecl(iface->iface);
write_clientinterfacedecl(iface->iface);
@ -424,11 +427,6 @@ void write_client(ifref_list_t *ifaces)
print_client("#endif\n");
fprintf(client, "\n");
expr_eval_routines = write_expr_eval_routines(client, iface->iface->name);
if (expr_eval_routines)
write_expr_eval_routine_list(client, iface->iface->name);
write_user_quad_list(client);
write_stubdescriptor(iface->iface, expr_eval_routines);
}
}

View File

@ -65,14 +65,14 @@ static void write_stubdescproto(void)
print_proxy( "\n");
}
static void write_stubdesc(void)
static void write_stubdesc(int expr_eval_routines)
{
print_proxy( "static const MIDL_STUB_DESC Object_StubDesc =\n{\n");
indent++;
print_proxy( "0,\n");
print_proxy( "NdrOleAllocate,\n");
print_proxy( "NdrOleFree,\n");
print_proxy( "{0}, 0, 0, 0, 0,\n");
print_proxy( "{0}, 0, 0, %s, 0,\n", expr_eval_routines ? "ExprEvalRoutines" : "0");
print_proxy( "__MIDL_TypeFormatString.Format,\n");
print_proxy( "1, /* -error bounds_check flag */\n");
print_proxy( "0x10001, /* Ndr library version */\n");
@ -598,6 +598,7 @@ int need_stub_files(const ifref_list_t *ifaces)
void write_proxies(ifref_list_t *ifaces)
{
ifref_t *cur;
int expr_eval_routines;
char *file_id = proxy_token;
int c;
unsigned int proc_offset = 0;
@ -613,8 +614,11 @@ void write_proxies(ifref_list_t *ifaces)
if (need_proxy(cur->iface))
write_proxy(cur->iface, &proc_offset);
expr_eval_routines = write_expr_eval_routines(proxy, proxy_token);
if (expr_eval_routines)
write_expr_eval_routine_list(proxy, proxy_token);
write_user_quad_list(proxy);
write_stubdesc();
write_stubdesc(expr_eval_routines);
print_proxy( "#if !defined(__RPC_WIN32__)\n");
print_proxy( "#error Currently only Wine and WIN32 are supported.\n");

View File

@ -399,6 +399,7 @@ static void init_server(void)
void write_server(ifref_list_t *ifaces)
{
unsigned int proc_offset = 0;
int expr_eval_routines;
ifref_t *iface;
if (!do_server)
@ -411,6 +412,10 @@ void write_server(ifref_list_t *ifaces)
return;
write_formatstringsdecl(server, indent, ifaces, need_stub);
expr_eval_routines = write_expr_eval_routines(server, server_token);
if (expr_eval_routines)
write_expr_eval_routine_list(server, server_token);
write_user_quad_list(server);
if (ifaces) LIST_FOR_EACH_ENTRY( iface, ifaces, ifref_t, entry )
{
@ -424,8 +429,6 @@ void write_server(ifref_list_t *ifaces)
if (iface->iface->funcs)
{
int expr_eval_routines;
write_serverinterfacedecl(iface->iface);
write_stubdescdecl(iface->iface);
@ -436,12 +439,6 @@ void write_server(ifref_list_t *ifaces)
print_server("#endif\n");
fprintf(server, "\n");
expr_eval_routines = write_expr_eval_routines(server, iface->iface->name);
if (expr_eval_routines)
write_expr_eval_routine_list(server, iface->iface->name);
write_user_quad_list(server);
write_stubdescriptor(iface->iface, expr_eval_routines);
write_dispatchtable(iface->iface);
}