Rémi Bernon (@rbernon) commented about tools/widl/metadata.c:
- if (!is_attr( method->attrs, ATTR_OVERLOAD )) return;
- assemblyref = add_assemblyref_row( 0x200, 0, add_string("Windows.Foundation") );
- scope = resolution_scope( TABLE_ASSEMBLYREF, assemblyref );
- typeref = add_typeref_row( scope, add_string("OverloadAttribute"), add_string("Windows.Foundation.Metadata") );
- class = memberref_parent( TABLE_TYPEREF, typeref );
- type->md.member[MD_ATTR_OVERLOAD] = add_memberref_row( class, add_string(".ctor"), add_blob(sig, sizeof(sig)) );
+}
+static void add_overload_attr_step2( const var_t *method ) +{
- const type_t *type = method->declspec.type;
- UINT parent, attr_type, value_size;
- BYTE value[256 + 5];
What about allocating this dynamically instead of hardcoding size with arbitrary numbers?