From: Richard Pospesel richard@torproject.org
Signed-off-by: Richard Pospesel richard@torproject.org Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/client.c | 2 +- tools/widl/header.c | 36 ++++++++++++++++---------------- tools/widl/proxy.c | 12 +++++------ tools/widl/server.c | 6 +++--- tools/widl/typegen.c | 46 ++++++++++++++++++++--------------------- tools/widl/widltypes.h | 5 ----- tools/widl/write_msft.c | 12 +++++------ 7 files changed, 57 insertions(+), 62 deletions(-)
diff --git a/tools/widl/client.c b/tools/widl/client.c index 0ab2fc60b2..3c0a0711b9 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -53,7 +53,7 @@ static void print_client( const char *format, ... ) static void write_client_func_decl( const type_t *iface, const var_t *func ) { const char *callconv = get_attrp(func->declspec.type->attrs, ATTR_CALLCONV); - const var_list_t *args = type_get_function_args(func->declspec.type); + const var_list_t *args = type_function_get_args(func->declspec.type); type_t *rettype = type_function_get_rettype(func->declspec.type);
if (!callconv) callconv = "__cdecl"; diff --git a/tools/widl/header.c b/tools/widl/header.c index 8c07564751..a862a72b52 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -863,7 +863,7 @@ const var_t *get_func_handle_var( const type_t *iface, const var_t *func, unsigned char *explicit_fc, unsigned char *implicit_fc ) { const var_t *var; - const var_list_t *args = type_get_function_args( func->declspec.type ); + const var_list_t *args = type_function_get_args( func->declspec.type );
*explicit_fc = *implicit_fc = 0; if (args) LIST_FOR_EACH_ENTRY( var, args, const var_t, entry ) @@ -907,10 +907,10 @@ int has_out_arg_or_return(const var_t *func) if (!is_void(type_function_get_rettype(func->declspec.type))) return 1;
- if (!type_get_function_args(func->declspec.type)) + if (!type_function_get_args(func->declspec.type)) return 0;
- LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), const var_t, entry ) if (is_attr(var->attrs, ATTR_OUT)) return 1;
@@ -1030,8 +1030,8 @@ static void write_method_macro(FILE *header, const type_t *iface, const type_t * const var_t *arg;
fprintf(header, "#define %s_%s(This", name, get_name(func)); - if (type_get_function_args(func->declspec.type)) - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->declspec.type), const var_t, entry ) + if (type_function_get_args(func->declspec.type)) + LIST_FOR_EACH_ENTRY( arg, type_function_get_args(func->declspec.type), const var_t, entry ) fprintf(header, ",%s", arg->name); fprintf(header, ") ");
@@ -1042,8 +1042,8 @@ static void write_method_macro(FILE *header, const type_t *iface, const type_t * }
fprintf(header, "(This)->lpVtbl->%s(This", get_vtbl_entry_name(iface, func)); - if (type_get_function_args(func->declspec.type)) - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->declspec.type), const var_t, entry ) + if (type_function_get_args(func->declspec.type)) + LIST_FOR_EACH_ENTRY( arg, type_function_get_args(func->declspec.type), const var_t, entry ) fprintf(header, ",%s", arg->name); fprintf(header, ")\n"); } @@ -1115,7 +1115,7 @@ static void write_cpp_method_def(FILE *header, const type_t *iface) const var_t *func = stmt->u.var; if (!is_callas(func->attrs)) { const char *callconv = get_attrp(func->declspec.type->attrs, ATTR_CALLCONV); - const var_list_t *args = type_get_function_args(func->declspec.type); + const var_list_t *args = type_function_get_args(func->declspec.type); const var_t *arg;
if (!callconv) callconv = "STDMETHODCALLTYPE"; @@ -1203,7 +1203,7 @@ static void write_inline_wrappers(FILE *header, const type_t *iface, const type_ fprintf(header, "static FORCEINLINE "); write_type_decl_left(header, type_function_get_rettype(func->declspec.type)); fprintf(header, " %s_%s(", name, get_name(func)); - write_args(header, type_get_function_args(func->declspec.type), name, 1, FALSE); + write_args(header, type_function_get_args(func->declspec.type), name, 1, FALSE); fprintf(header, ") {\n"); ++indentation; if (!is_aggregate_return(func)) { @@ -1218,8 +1218,8 @@ static void write_inline_wrappers(FILE *header, const type_t *iface, const type_ indent(header, 0); fprintf(header, "return *This->lpVtbl->%s(This,&__ret", get_vtbl_entry_name(iface, func)); } - if (type_get_function_args(func->declspec.type)) - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->declspec.type), const var_t, entry ) + if (type_function_get_args(func->declspec.type)) + LIST_FOR_EACH_ENTRY( arg, type_function_get_args(func->declspec.type), const var_t, entry ) fprintf(header, ",%s", arg->name); fprintf(header, ");\n"); --indentation; @@ -1265,9 +1265,9 @@ static void do_write_c_method_def(FILE *header, const type_t *iface, const char fprintf(header, " *__ret"); } --indentation; - if (type_get_function_args(func->declspec.type)) { + if (type_function_get_args(func->declspec.type)) { fprintf(header, ",\n"); - write_args(header, type_get_function_args(func->declspec.type), name, 0, TRUE); + write_args(header, type_function_get_args(func->declspec.type), name, 0, TRUE); } fprintf(header, ");\n"); fprintf(header, "\n"); @@ -1299,7 +1299,7 @@ static void write_method_proto(FILE *header, const type_t *iface) /* proxy prototype */ write_type_decl_left(header, type_function_get_rettype(func->declspec.type)); fprintf(header, " %s %s_%s_Proxy(\n", callconv, iface->name, get_name(func)); - write_args(header, type_get_function_args(func->declspec.type), iface->name, 1, TRUE); + write_args(header, type_function_get_args(func->declspec.type), iface->name, 1, TRUE); fprintf(header, ");\n"); /* stub prototype */ fprintf(header, "void __RPC_STUB %s_%s_Stub(\n", iface->name, get_name(func)); @@ -1334,7 +1334,7 @@ static void write_locals(FILE *fp, const type_t *iface, int body) /* proxy prototype - use local prototype */ write_type_decl_left(fp, type_function_get_rettype(m->declspec.type)); fprintf(fp, " CALLBACK %s_%s_Proxy(\n", iface->name, get_name(m)); - write_args(fp, type_get_function_args(m->declspec.type), iface->name, 1, TRUE); + write_args(fp, type_function_get_args(m->declspec.type), iface->name, 1, TRUE); fprintf(fp, ")"); if (body) { type_t *rt = type_function_get_rettype(m->declspec.type); @@ -1356,7 +1356,7 @@ static void write_locals(FILE *fp, const type_t *iface, int body) /* stub prototype - use remotable prototype */ write_type_decl_left(fp, type_function_get_rettype(func->declspec.type)); fprintf(fp, " __RPC_STUB %s_%s_Stub(\n", iface->name, get_name(m)); - write_args(fp, type_get_function_args(func->declspec.type), iface->name, 1, TRUE); + write_args(fp, type_function_get_args(func->declspec.type), iface->name, 1, TRUE); fprintf(fp, ")"); if (body) /* Remotable methods must all return HRESULTs. */ @@ -1409,8 +1409,8 @@ static void write_function_proto(FILE *header, const type_t *iface, const var_t write_type_decl_left(header, type_function_get_rettype(fun->declspec.type)); fprintf(header, " %s ", callconv); fprintf(header, "%s%s(\n", prefix, get_name(fun)); - if (type_get_function_args(fun->declspec.type)) - write_args(header, type_get_function_args(fun->declspec.type), iface->name, 0, TRUE); + if (type_function_get_args(fun->declspec.type)) + write_args(header, type_function_get_args(fun->declspec.type), iface->name, 0, TRUE); else fprintf(header, " void"); fprintf(header, ");\n\n"); diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 45e25826d7..6f19ff15df 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -195,7 +195,7 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx, int has_ret = !is_void(retval->declspec.type); int has_full_pointer = is_full_pointer_function(func); const char *callconv = get_attrp(func->declspec.type->attrs, ATTR_CALLCONV); - const var_list_t *args = type_get_function_args(func->declspec.type); + const var_list_t *args = type_function_get_args(func->declspec.type); if (!callconv) callconv = "STDMETHODCALLTYPE";
indent = 0; @@ -246,7 +246,7 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx, write_full_pointer_init(proxy, indent, func, FALSE);
/* FIXME: trace */ - clear_output_vars( type_get_function_args(func->declspec.type) ); + clear_output_vars( type_function_get_args(func->declspec.type) );
print_proxy( "RpcTryExcept\n" ); print_proxy( "{\n" ); @@ -301,7 +301,7 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx, print_proxy( "{\n" ); if (has_ret) { indent++; - proxy_free_variables( type_get_function_args(func->declspec.type), "" ); + proxy_free_variables( type_function_get_args(func->declspec.type), "" ); print_proxy( "_RetVal = NdrProxyErrorHandler(RpcExceptionCode());\n" ); indent--; } @@ -389,9 +389,9 @@ static void gen_stub(type_t *iface, const var_t *func, const char *cas, else fprintf(proxy, "__frame->_This->lpVtbl->%s", get_name(func)); fprintf(proxy, "(__frame->_This");
- if (type_get_function_args(func->declspec.type)) + if (type_function_get_args(func->declspec.type)) { - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( arg, type_function_get_args(func->declspec.type), const var_t, entry ) fprintf(proxy, ", %s__frame->%s", is_array(arg->declspec.type) && !type_array_is_decl_as_ptr(arg->declspec.type) ? "*" :"" , arg->name); } fprintf(proxy, ");\n"); @@ -434,7 +434,7 @@ static void gen_stub_thunk( type_t *iface, const var_t *func, unsigned int proc_ { int has_ret = !is_void( type_function_get_rettype( func->declspec.type )); const var_t *arg, *callas = is_callas( func->attrs ); - const var_list_t *args = type_get_function_args( func->declspec.type ); + const var_list_t *args = type_function_get_args( func->declspec.type );
indent = 0; print_proxy( "void __RPC_API %s_%s_Thunk( PMIDL_STUB_MESSAGE pStubMsg )\n", diff --git a/tools/widl/server.c b/tools/widl/server.c index 156cd3c2f9..1ab305950a 100644 --- a/tools/widl/server.c +++ b/tools/widl/server.c @@ -121,7 +121,7 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned if (has_full_pointer) write_full_pointer_init(server, indent, func, TRUE);
- if (type_get_function_args(func->declspec.type)) + if (type_function_get_args(func->declspec.type)) { print_server("if ((_pRpcMessage->DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)\n"); indent++; @@ -166,13 +166,13 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned print_server("%s", is_void(ret_type) ? "" : "__frame->_RetVal = "); fprintf(server, "%s%s", prefix_server, get_name(func));
- if (type_get_function_args(func->declspec.type)) + if (type_function_get_args(func->declspec.type)) { int first_arg = 1;
fprintf(server, "(\n"); indent++; - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), const var_t, entry ) { if (first_arg) first_arg = 0; diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index f901f83d1e..86611aed68 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -912,10 +912,10 @@ void write_parameters_init(FILE *file, int indent, const var_t *func, const char if (!is_void(var->declspec.type)) write_var_init(file, indent, var->declspec.type, var->name, local_var_prefix);
- if (!type_get_function_args(func->declspec.type)) + if (!type_function_get_args(func->declspec.type)) return;
- LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), const var_t, entry ) write_var_init(file, indent, var->declspec.type, var->name, local_var_prefix);
fprintf(file, "\n"); @@ -1128,7 +1128,7 @@ static unsigned char get_parameter_fc( const var_t *var, int is_return, unsigned static unsigned char get_func_oi2_flags( const var_t *func ) { const var_t *var; - var_list_t *args = type_get_function_args( func->declspec.type ); + var_list_t *args = type_function_get_args( func->declspec.type ); var_t *retval = type_function_get_retval( func->declspec.type ); unsigned char oi2_flags = 0x40; /* HasExtensions */ unsigned short flags; @@ -1254,7 +1254,7 @@ int is_interpreted_func( const type_t *iface, const var_t *func ) { const char *str; const var_t *var; - const var_list_t *args = type_get_function_args( func->declspec.type ); + const var_list_t *args = type_function_get_args( func->declspec.type ); const type_t *ret_type = type_function_get_rettype( func->declspec.type );
if (type_get_type( ret_type ) == TYPE_BASIC) @@ -1305,7 +1305,7 @@ static void write_proc_func_header( FILE *file, int indent, const type_t *iface, unsigned short num_proc ) { var_t *var; - var_list_t *args = type_get_function_args( func->declspec.type ); + var_list_t *args = type_function_get_args( func->declspec.type ); unsigned char explicit_fc, implicit_fc; unsigned char handle_flags; const var_t *handle_var = get_func_handle_var( iface, func, &explicit_fc, &implicit_fc ); @@ -1445,10 +1445,10 @@ static void write_procformatstring_func( FILE *file, int indent, const type_t *i if (is_interpreted) write_proc_func_header( file, indent, iface, func, offset, num_proc );
/* emit argument data */ - if (type_get_function_args(func->declspec.type)) + if (type_function_get_args(func->declspec.type)) { const var_t *var; - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), const var_t, entry ) { print_file( file, 0, "/* %u (parameter %s) */\n", *offset, var->name ); if (is_new_style) @@ -1669,7 +1669,7 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *cont_type,
if (type_get_type(cont_type) == TYPE_FUNCTION) { - var_list_t *args = type_get_function_args( cont_type ); + var_list_t *args = type_function_get_args( cont_type );
if (is_object( iface )) offset += pointer_size; if (args) LIST_FOR_EACH_ENTRY( var, args, const var_t, entry ) @@ -2079,9 +2079,9 @@ int is_full_pointer_function(const var_t *func) const var_t *var; if (type_has_full_pointer(type_function_get_rettype(func->declspec.type), func->attrs, TRUE)) return TRUE; - if (!type_get_function_args(func->declspec.type)) + if (!type_function_get_args(func->declspec.type)) return FALSE; - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), const var_t, entry ) if (type_has_full_pointer( var->declspec.type, var->attrs, TRUE )) return TRUE; return FALSE; @@ -3711,8 +3711,8 @@ static void process_tfs_iface(type_t *iface, FILE *file, int indent, unsigned in var->typestring_offset = write_type_tfs( file, var->attrs, var->declspec.type, func->name, TYPE_CONTEXT_RETVAL, offset);
- if (type_get_function_args(func->declspec.type)) - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), var_t, entry ) + if (type_function_get_args(func->declspec.type)) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), var_t, entry ) var->typestring_offset = write_type_tfs( file, var->attrs, var->declspec.type, var->name, TYPE_CONTEXT_TOPLEVELPARAM, offset ); break; @@ -3911,9 +3911,9 @@ static unsigned int get_function_buffer_size( const var_t *func, enum pass pass const var_t *var; unsigned int total_size = 0, alignment;
- if (type_get_function_args(func->declspec.type)) + if (type_function_get_args(func->declspec.type)) { - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), const var_t, entry ) { total_size += get_required_buffer_size(var, &alignment, pass); total_size += alignment; @@ -4561,9 +4561,9 @@ void write_remoting_arguments(FILE *file, int indent, const var_t *func, const c else { const var_t *var; - if (!type_get_function_args(func->declspec.type)) + if (!type_function_get_args(func->declspec.type)) return; - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), const var_t, entry ) write_remoting_arg( file, indent, func, local_var_prefix, pass, phase, var ); } } @@ -4619,10 +4619,10 @@ void declare_stub_args( FILE *file, int indent, const var_t *func ) } }
- if (!type_get_function_args(func->declspec.type)) + if (!type_function_get_args(func->declspec.type)) return;
- LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), const var_t, entry ) { in_attr = is_attr(var->attrs, ATTR_IN); out_attr = is_attr(var->attrs, ATTR_OUT); @@ -4673,10 +4673,10 @@ void assign_stub_out_args( FILE *file, int indent, const var_t *func, const char const var_t *var; type_t *ref;
- if (!type_get_function_args(func->declspec.type)) + if (!type_function_get_args(func->declspec.type)) return;
- LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->declspec.type), const var_t, entry ) + LIST_FOR_EACH_ENTRY( var, type_function_get_args(func->declspec.type), const var_t, entry ) { in_attr = is_attr(var->attrs, ATTR_IN); out_attr = is_attr(var->attrs, ATTR_OUT); @@ -4783,7 +4783,7 @@ void write_func_param_struct( FILE *file, const type_t *iface, const type_t *fun const char *var_decl, int add_retval ) { var_t *retval = type_function_get_retval( func ); - const var_list_t *args = type_get_function_args( func ); + const var_list_t *args = type_function_get_args( func ); const var_t *arg; int needs_packing; unsigned int align = 0; @@ -4833,7 +4833,7 @@ void write_func_param_struct( FILE *file, const type_t *iface, const type_t *fun
void write_pointer_checks( FILE *file, int indent, const var_t *func ) { - const var_list_t *args = type_get_function_args( func->declspec.type ); + const var_list_t *args = type_function_get_args( func->declspec.type ); const var_t *var;
if (!args) return; @@ -4965,7 +4965,7 @@ void write_client_call_routine( FILE *file, const type_t *iface, const var_t *fu { type_t *rettype = type_function_get_rettype( func->declspec.type ); int has_ret = !is_void( rettype ); - const var_list_t *args = type_get_function_args( func->declspec.type ); + const var_list_t *args = type_function_get_args( func->declspec.type ); const var_t *arg; int len, needs_params = 0;
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index bd727f70b6..729d712a27 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -589,11 +589,6 @@ void init_loc_info(loc_info_t *);
char *format_namespace(struct namespace *namespace, const char *prefix, const char *separator, const char *suffix);
-static inline var_list_t *type_get_function_args(const type_t *func_type) -{ - return func_type->details.function->args; -} - static inline enum type_type type_get_type_detect_alias(const type_t *type) { if (type->is_alias) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 9a3edf7291..98fa7ddadf 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1301,8 +1301,8 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) return S_FALSE; }
- if (type_get_function_args(func->declspec.type)) - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->declspec.type), var_t, entry ) + if (type_function_get_args(func->declspec.type)) + LIST_FOR_EACH_ENTRY( arg, type_function_get_args(func->declspec.type), var_t, entry ) { num_params++; if (arg->attrs) LIST_FOR_EACH_ENTRY( attr, arg->attrs, const attr_t, entry ) { @@ -1471,10 +1471,10 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) warning("unknown number of optional attrs\n"); }
- if (type_get_function_args(func->declspec.type)) + if (type_function_get_args(func->declspec.type)) { i = 0; - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->declspec.type), var_t, entry ) + LIST_FOR_EACH_ENTRY( arg, type_function_get_args(func->declspec.type), var_t, entry ) { int paramflags = 0; int *paramdata = typedata + 6 + extra_attr + (num_defaults ? num_params : 0) + i * 3; @@ -1572,10 +1572,10 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) if(typeinfo->typekind == TKIND_MODULE) namedata[9] |= 0x20;
- if (type_get_function_args(func->declspec.type)) + if (type_function_get_args(func->declspec.type)) { i = 0; - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->declspec.type), var_t, entry ) + LIST_FOR_EACH_ENTRY( arg, type_function_get_args(func->declspec.type), var_t, entry ) { /* don't give the last arg of a [propput*] func a name */ if(i != num_params - 1 || (invokekind != 0x4 /* INVOKE_PROPERTYPUT */ && invokekind != 0x8 /* INVOKE_PROPERTYPUTREF */))
This seems to have been broken since 0f7f7922bab; is_incomplete() will only return true for non-aliases. It could be fixed by reverting that hunk of 0f7f7922bab, but we intend rather to change the representation of aliases so that no "fixing" is needed.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/parser.y | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index ff867655fa..ff6ed1f685 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -54,7 +54,6 @@ struct _import_t
typelist_t incomplete_types = LIST_INIT(incomplete_types);
-static void fix_incomplete(void); static void fix_incomplete_types(type_t *complete_type);
static str_list_t *append_str(str_list_t *list, char *str); @@ -315,8 +314,7 @@ static typelib_t *current_typelib;
%%
-input: gbl_statements m_acf { fix_incomplete(); - check_statements($1, FALSE); +input: gbl_statements m_acf { check_statements($1, FALSE); check_all_user_types($1); write_header($1); write_id_data($1); @@ -1914,30 +1912,6 @@ void add_incomplete(type_t *t) list_add_tail(&incomplete_types, &tn->entry); }
-static void fix_type(type_t *t) -{ - if (type_is_alias(t) && is_incomplete(t)) { - type_t *ot = type_alias_get_aliasee(t); - fix_type(ot); - if (type_get_type_detect_alias(ot) == TYPE_STRUCT || - type_get_type_detect_alias(ot) == TYPE_UNION || - type_get_type_detect_alias(ot) == TYPE_ENCAPSULATED_UNION) - t->details.structure = ot->details.structure; - t->defined = ot->defined; - } -} - -static void fix_incomplete(void) -{ - struct typenode *tn, *next; - - LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) { - fix_type(tn->type); - list_remove(&tn->entry); - free(tn); - } -} - static void fix_incomplete_types(type_t *complete_type) { struct typenode *tn, *next;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55466
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 Task: Patch failed to apply
From: Richard Pospesel richard@torproject.org
Signed-off-by: Richard Pospesel richard@torproject.org Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index ff6ed1f685..d45e682f8e 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -1559,7 +1559,7 @@ static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const decl warning_loc_info(&v->loc_info, "%s: pointer attribute applied to interface " "pointer type has no effect\n", v->name); - if (!ptr_attr && top && (*pt)->details.pointer.def_fc != FC_RP) + if (!ptr_attr && top && type_pointer_get_default_fc(*pt) != FC_RP) { /* FIXME: this is a horrible hack to cope with the issue that we * store an offset to the typeformat string in the type object, but
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55467
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 Task: Patch failed to apply
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/parser.y | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index d45e682f8e..daff825771 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -2668,7 +2668,10 @@ static void check_remoting_args(const var_t *func) const char *funcname = func->name; const var_t *arg;
- if (func->declspec.type->details.function->args) LIST_FOR_EACH_ENTRY( arg, func->declspec.type->details.function->args, const var_t, entry ) + if (!type_function_get_args(func->declspec.type)) + return; + + LIST_FOR_EACH_ENTRY( arg, type_function_get_args(func->declspec.type), const var_t, entry ) { const type_t *type = arg->declspec.type;
@@ -2818,7 +2821,7 @@ static void check_async_uuid(type_t *iface) var_t *begin_func, *finish_func, *func = stmt->u.var, *arg; var_list_t *begin_args = NULL, *finish_args = NULL, *args;
- args = func->declspec.type->details.function->args; + args = type_function_get_args(func->declspec.type); if (args) LIST_FOR_EACH_ENTRY(arg, args, var_t, entry) { if (is_attr(arg->attrs, ATTR_IN) || !is_attr(arg->attrs, ATTR_OUT)) @@ -2888,8 +2891,8 @@ static void check_all_user_types(const statement_list_t *stmts) const statement_t *stmt_func; STATEMENTS_FOR_EACH_FUNC(stmt_func, type_iface_get_stmts(stmt->u.type)) { const var_t *func = stmt_func->u.var; - if (func->declspec.type->details.function->args) - LIST_FOR_EACH_ENTRY( v, func->declspec.type->details.function->args, const var_t, entry ) + if (type_function_get_args(func->declspec.type)) + LIST_FOR_EACH_ENTRY( v, type_function_get_args(func->declspec.type), const var_t, entry ) check_for_additional_prototype_types(v->declspec.type); check_for_additional_prototype_types(type_function_get_rettype(func->declspec.type)); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55468
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 error: patch failed: tools/widl/parser.y:2668 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 error: patch failed: tools/widl/parser.y:2668 Task: Patch failed to apply
It's not a part of the type; e.g. it doesn't make sense on a function pointer.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/proxy.c | 4 ++-- tools/widl/typetree.c | 7 +++---- tools/widl/widltypes.h | 6 ++++-- 3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 6f19ff15df..466c46219f 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -614,14 +614,14 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) if (!is_local(func->attrs)) { const var_t *cas = is_callas(func->attrs); const char *cname = cas ? cas->name : NULL; - int idx = func->declspec.type->details.function->idx; + int idx = func->func_idx; if (cname) { const statement_t *stmt2; STATEMENTS_FOR_EACH_FUNC(stmt2, type_iface_get_stmts(iface)) { const var_t *m = stmt2->u.var; if (!strcmp(m->name, cname)) { - idx = m->declspec.type->details.function->idx; + idx = m->func_idx; break; } } diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index 0a8ae0f3b2..e727d8c697 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -174,7 +174,6 @@ type_t *type_new_function(var_list_t *args) t = make_type(TYPE_FUNCTION); t->details.function = xmalloc(sizeof(*t->details.function)); t->details.function->args = args; - t->details.function->idx = -1; return t; }
@@ -413,9 +412,9 @@ type_t *type_new_bitfield(type_t *field, const expr_t *bits) return t; }
-static int compute_method_indexes(type_t *iface) +static unsigned int compute_method_indexes(type_t *iface) { - int idx; + unsigned int idx; statement_t *stmt;
if (!iface->details.iface) @@ -430,7 +429,7 @@ static int compute_method_indexes(type_t *iface) { var_t *func = stmt->u.var; if (!is_callas(func->attrs)) - func->declspec.type->details.function->idx = idx++; + func->func_idx = idx++; }
return idx; diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 729d712a27..5e0f34db8d 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -342,7 +342,6 @@ struct func_details { var_list_t *args; struct _var_t *retval; - int idx; };
struct iface_details @@ -460,9 +459,12 @@ struct _var_t { decl_spec_t declspec; attr_list_t *attrs; expr_t *eval; - unsigned int procstring_offset; + unsigned int typestring_offset;
+ /* fields specific to functions */ + unsigned int procstring_offset, func_idx; + struct _loc_info_t loc_info;
/* parser-internal */
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55469
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 error: patch failed: tools/widl/parser.y:2668 error: patch failed: tools/widl/proxy.c:614 error: patch failed: tools/widl/typetree.c:430 error: patch failed: tools/widl/widltypes.h:460 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 error: patch failed: tools/widl/parser.y:2668 error: patch failed: tools/widl/proxy.c:614 error: patch failed: tools/widl/typetree.c:430 error: patch failed: tools/widl/widltypes.h:460 Task: Patch failed to apply
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55465
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: tools/widl/client.c:53 error: patch failed: tools/widl/header.c:863 error: patch failed: tools/widl/proxy.c:195 error: patch failed: tools/widl/server.c:121 error: patch failed: tools/widl/typegen.c:912 error: patch failed: tools/widl/write_msft.c:1301 Task: Patch failed to apply