From: Huw Davies huw@codeweavers.com
--- tools/widl/write_sltg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/widl/write_sltg.c b/tools/widl/write_sltg.c index 5429b60c607..497cfb98d11 100644 --- a/tools/widl/write_sltg.c +++ b/tools/widl/write_sltg.c @@ -1155,7 +1155,7 @@ static int add_func_desc(struct sltg_typelib *typelib, struct sltg_data *data, v int idx, int dispid, short base_offset, struct sltg_hrefmap *hrefmap) { struct sltg_data ret_data, *arg_data; - int arg_count = 0, arg_data_size, optional = 0, defaults = 0, old_size; + int arg_count = 0, arg_data_size, optional = 0, old_size; int funcflags = 0, invokekind = 1 /* INVOKE_FUNC */, helpcontext; const char *helpstring; const var_t *arg; @@ -1218,9 +1218,7 @@ static int add_func_desc(struct sltg_typelib *typelib, struct sltg_data *data, v
LIST_FOR_EACH_ENTRY(attr, arg->attrs, const attr_t, entry) { - if (attr->type == ATTR_DEFAULTVALUE) - defaults++; - else if(attr->type == ATTR_OPTIONAL) + if (attr->type == ATTR_OPTIONAL) optional++; } }
This merge request was approved by Rémi Bernon.
Looks good to me from a purely syntactic perspective, then i don't know if this was supposed to be doing something instead.
On Mon Aug 26 11:54:22 2024 +0000, Rémi Bernon wrote:
Looks good to me from a purely syntactic perspective, then i don't know if this was supposed to be doing something instead.
Right, I meant to ask @dmitry to take a look.
On Mon Aug 26 11:54:22 2024 +0000, Huw Davies wrote:
Right, I meant to ask @dmitry to take a look.
The whole SLTG thing was written using MSFT typelib code as a reference, and this chunk was copied from write_msft.c. Looks like I haven't found the meaning for it in SLTG typelibs.