Commit 93dd2521 authored by Alexandre Julliard's avatar Alexandre Julliard

widl: Output a list of binding routines in client files.

parent c2406be6
......@@ -351,7 +351,10 @@ static void write_stubdescriptor(type_t *iface, int expr_eval_routines)
indent--;
print_client("},\n");
print_client("0,\n");
print_client("0,\n");
if (!list_empty( &generic_handle_list ))
print_client("BindingRoutines,\n");
else
print_client("0,\n");
if (expr_eval_routines)
print_client("ExprEvalRoutines,\n");
else
......@@ -496,6 +499,23 @@ static void write_client_ifaces(const statement_list_t *stmts, int expr_eval_rou
}
}
static void write_generic_handle_routine_list(void)
{
generic_handle_t *gh;
if (list_empty( &generic_handle_list )) return;
print_client( "static const GENERIC_BINDING_ROUTINE_PAIR BindingRoutines[] =\n" );
print_client( "{\n" );
indent++;
LIST_FOR_EACH_ENTRY( gh, &generic_handle_list, generic_handle_t, entry )
{
print_client( "{ (GENERIC_BINDING_ROUTINE)%s_bind, (GENERIC_UNBIND_ROUTINE)%s_unbind },\n",
gh->name, gh->name );
}
indent--;
print_client( "};\n\n" );
}
static void write_client_routines(const statement_list_t *stmts)
{
unsigned int proc_offset = 0;
......@@ -508,6 +528,7 @@ static void write_client_routines(const statement_list_t *stmts)
expr_eval_routines = write_expr_eval_routines(client, client_token);
if (expr_eval_routines)
write_expr_eval_routine_list(client, client_token);
write_generic_handle_routine_list();
write_user_quad_list(client);
write_client_ifaces(stmts, expr_eval_routines, &proc_offset);
......
......@@ -36,13 +36,11 @@
#include "expr.h"
#include "typetree.h"
typedef struct _user_type_t generic_handle_t;
static int indentation = 0;
static int is_object_interface = 0;
user_type_list_t user_type_list = LIST_INIT(user_type_list);
static context_handle_list_t context_handle_list = LIST_INIT(context_handle_list);
static struct list generic_handle_list = LIST_INIT(generic_handle_list);
generic_handle_list_t generic_handle_list = LIST_INIT(generic_handle_list);
static void write_type_def_or_decl(FILE *f, type_t *t, int field, const char *name);
......
......@@ -48,6 +48,7 @@ typedef struct _importinfo_t importinfo_t;
typedef struct _typelib_t typelib_t;
typedef struct _user_type_t user_type_t;
typedef struct _user_type_t context_handle_t;
typedef struct _user_type_t generic_handle_t;
typedef struct _type_list_t type_list_t;
typedef struct _statement_t statement_t;
......@@ -60,6 +61,7 @@ typedef struct list ifref_list_t;
typedef struct list array_dims_t;
typedef struct list user_type_list_t;
typedef struct list context_handle_list_t;
typedef struct list generic_handle_list_t;
typedef struct list statement_list_t;
enum attr_type
......@@ -530,6 +532,7 @@ typedef enum {
extern syskind_t typelib_kind;
extern user_type_list_t user_type_list;
extern generic_handle_list_t generic_handle_list;
void check_for_additional_prototype_types(const var_list_t *list);
void init_types(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment