Alexandre Julliard pushed to branch master at wine / wine
Commits: 57288dd2 by Elizabeth Figura at 2024-08-12T12:37:23+02:00 widl: Explicitly check for top-level parameters before adding FC_ALLOCED_ON_STACK.
- - - - - 86a4953a by Elizabeth Figura at 2024-08-12T12:37:23+02:00 widl: Get rid of the write_embedded_types() helper.
It's barely doing anything anymore after 06e7eb5c98d473cf1edc828c67f6a6586a94e2f7.
- - - - - f06fe0e4 by Elizabeth Figura at 2024-08-12T12:37:25+02:00 widl: Ignore strings in is_embedded_complex().
Arrays declared as strings go via an embedded complex (e.g. "[string] char s[64];"). This matches the logic used to decide struct or array FC.
This commit does nothing yet, since we pass NULL attributes, but we need to change that so that other types are treated correctly (in particular, void pointers with [iid_is].)
- - - - - 8bce5533 by Elizabeth Figura at 2024-08-12T12:37:26+02:00 widl: Propagate attrs to inner pointer types.
Some attributes, namely [iid_is], [string], [switch_is], and [switch_type], apply to the innermost type. That is, when specified on a top-level parameter like
int func(..., [iid_is(...)] void ****arg);
the innermost pointee ***arg must have an iid type.
At the same time, the pointer type attributes [ref], [unique], [ptr] must *only* apply to the top-level pointer. Inner pointers have the default pointer type.
In order to implement this, we always pass "attrs" to inner array and pointer types, and we also pass around an extra parameter "toplevel_attrs" which signifies whether the passed-in attributes should be applied directly to this type (having come from a parameter, field, or typedef), or whether they were inherited from a higher-level pointer.
- - - - -
2 changed files:
- tools/widl/typegen.c - tools/widl/typegen.h
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/6091f503db0608cb9f9fd8a4a43eff...