mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-04 20:47:37 +00:00
widl: Fold class_t into type_t.
This commit is contained in:
parent
1afed1f8d8
commit
c67b19b4f4
|
@ -855,7 +855,7 @@ static void write_dispiface_guid(const type_t *iface)
|
|||
write_guid("DIID", iface->name, uuid);
|
||||
}
|
||||
|
||||
static void write_coclass_guid(class_t *cocl)
|
||||
static void write_coclass_guid(type_t *cocl)
|
||||
{
|
||||
const UUID *uuid = get_attrp(cocl->attrs, ATTR_UUID);
|
||||
write_guid("CLSID", cocl->name, uuid);
|
||||
|
@ -1006,7 +1006,7 @@ void write_dispinterface(type_t *iface)
|
|||
fprintf(header,"#endif /* __%s_DISPINTERFACE_DEFINED__ */\n\n", iface->name);
|
||||
}
|
||||
|
||||
void write_coclass(class_t *cocl)
|
||||
void write_coclass(type_t *cocl)
|
||||
{
|
||||
fprintf(header, "/*****************************************************************************\n");
|
||||
fprintf(header, " * %s coclass\n", cocl->name);
|
||||
|
@ -1015,7 +1015,7 @@ void write_coclass(class_t *cocl)
|
|||
fprintf(header, "\n");
|
||||
}
|
||||
|
||||
void write_coclass_forward(class_t *cocl)
|
||||
void write_coclass_forward(type_t *cocl)
|
||||
{
|
||||
fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", cocl->name);
|
||||
fprintf(header, "#define __%s_FWD_DEFINED__\n", cocl->name);
|
||||
|
|
|
@ -36,8 +36,8 @@ extern void write_array(FILE *h, const expr_t *v, int field);
|
|||
extern void write_forward(type_t *iface);
|
||||
extern void write_interface(type_t *iface);
|
||||
extern void write_dispinterface(type_t *iface);
|
||||
extern void write_coclass(class_t *iface);
|
||||
extern void write_coclass_forward(class_t *iface);
|
||||
extern void write_coclass(type_t *cocl);
|
||||
extern void write_coclass_forward(type_t *cocl);
|
||||
extern void write_typedef(type_t *type, const var_t *names);
|
||||
extern void write_expr(FILE *h, const expr_t *e, int brackets);
|
||||
extern void write_constdef(const var_t *v);
|
||||
|
|
|
@ -82,7 +82,7 @@ static void set_type(var_t *v, typeref_t *ref, expr_t *arr);
|
|||
static ifref_t *make_ifref(type_t *iface);
|
||||
static var_t *make_var(char *name);
|
||||
static func_t *make_func(var_t *def, var_t *args);
|
||||
static class_t *make_class(char *name);
|
||||
static type_t *make_class(char *name);
|
||||
static type_t *make_safearray(void);
|
||||
|
||||
static type_t *reg_type(type_t *type, const char *name, int t);
|
||||
|
@ -114,7 +114,6 @@ static type_t std_uhyper = { "MIDL_uhyper" };
|
|||
var_t *var;
|
||||
func_t *func;
|
||||
ifref_t *ifref;
|
||||
class_t *clas;
|
||||
char *str;
|
||||
UUID *uuid;
|
||||
unsigned int num;
|
||||
|
@ -219,7 +218,7 @@ static type_t std_uhyper = { "MIDL_uhyper" };
|
|||
%type <var> dispint_props
|
||||
%type <func> funcdef int_statements
|
||||
%type <func> dispint_meths
|
||||
%type <clas> coclass coclasshdr coclassdef
|
||||
%type <type> coclass coclasshdr coclassdef
|
||||
%type <num> pointer_type version
|
||||
%type <str> libraryhdr
|
||||
|
||||
|
@ -1056,6 +1055,7 @@ static type_t *make_type(unsigned char type, type_t *ref)
|
|||
t->attrs = NULL;
|
||||
t->funcs = NULL;
|
||||
t->fields = NULL;
|
||||
t->ifaces = NULL;
|
||||
t->ignore = parse_only;
|
||||
t->is_const = FALSE;
|
||||
t->sign = 0;
|
||||
|
@ -1139,12 +1139,10 @@ static func_t *make_func(var_t *def, var_t *args)
|
|||
return f;
|
||||
}
|
||||
|
||||
static class_t *make_class(char *name)
|
||||
static type_t *make_class(char *name)
|
||||
{
|
||||
class_t *c = xmalloc(sizeof(class_t));
|
||||
type_t *c = make_type(0, NULL);
|
||||
c->name = name;
|
||||
c->attrs = NULL;
|
||||
c->ifaces = NULL;
|
||||
INIT_LINK(c);
|
||||
return c;
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ void add_interface(type_t *iface)
|
|||
typelib->entry = entry;
|
||||
}
|
||||
|
||||
void add_coclass(class_t *cls)
|
||||
void add_coclass(type_t *cls)
|
||||
{
|
||||
typelib_entry_t *entry;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ extern int in_typelib;
|
|||
extern void start_typelib(char *name, attr_t *attrs);
|
||||
extern void end_typelib(void);
|
||||
extern void add_interface(type_t *iface);
|
||||
extern void add_coclass(class_t *cls);
|
||||
extern void add_coclass(type_t *cls);
|
||||
extern void add_module(type_t *module);
|
||||
extern void add_struct(type_t *structure);
|
||||
extern void add_enum(type_t *enumeration);
|
||||
|
|
|
@ -40,7 +40,6 @@ typedef struct _typeref_t typeref_t;
|
|||
typedef struct _var_t var_t;
|
||||
typedef struct _func_t func_t;
|
||||
typedef struct _ifref_t ifref_t;
|
||||
typedef struct _class_t class_t;
|
||||
typedef struct _typelib_entry_t typelib_entry_t;
|
||||
typedef struct _importlib_t importlib_t;
|
||||
typedef struct _importinfo_t importinfo_t;
|
||||
|
@ -203,8 +202,9 @@ struct _type_t {
|
|||
unsigned char type;
|
||||
struct _type_t *ref;
|
||||
const attr_t *attrs;
|
||||
func_t *funcs;
|
||||
var_t *fields;
|
||||
func_t *funcs; /* interfaces and modules */
|
||||
var_t *fields; /* interfaces, structures and enumerations */
|
||||
ifref_t *ifaces; /* coclasses */
|
||||
int ignore, is_const, sign;
|
||||
int defined, written, user_types_registered;
|
||||
int typelib_idx;
|
||||
|
@ -249,19 +249,10 @@ struct _ifref_t {
|
|||
DECL_LINK(ifref_t);
|
||||
};
|
||||
|
||||
struct _class_t {
|
||||
char *name;
|
||||
attr_t *attrs;
|
||||
ifref_t *ifaces;
|
||||
|
||||
/* parser-internal */
|
||||
DECL_LINK(class_t);
|
||||
};
|
||||
|
||||
struct _typelib_entry_t {
|
||||
enum type_kind kind;
|
||||
union {
|
||||
class_t *class;
|
||||
type_t *class;
|
||||
type_t *interface;
|
||||
type_t *module;
|
||||
type_t *structure;
|
||||
|
|
|
@ -2061,7 +2061,7 @@ static void add_typedef_typeinfo(msft_typelib_t *typelib, var_t *tdef)
|
|||
msft_typeinfo->typeinfo->typekind |= (alignment << 11 | alignment << 6);
|
||||
}
|
||||
|
||||
static void add_coclass_typeinfo(msft_typelib_t *typelib, class_t *cls)
|
||||
static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls)
|
||||
{
|
||||
msft_typeinfo_t *msft_typeinfo;
|
||||
ifref_t *iref;
|
||||
|
|
Loading…
Reference in a new issue