In a declaration with multiple variables, the variables must be created
before the initializer of the next variable is parsed. This is required
for initializers such as:
```
float a = 1, b = a, c = b + 1;
```
The solution is to parse the type information in the same rule as the first variable ('a' in this case) so that it can be declared before the parser reaches the initializer for the following variables.
To initialize the following variables, the type information is passed along from the first variable's struct parse_variable_def to the next and so on.
---
Solves https://bugs.winehq.org/show_bug.cgi?id=54484, pointed out by @nsivov.
--
v3: vkd3d-shader/hlsl: Declare vars individually when parsing struct declarations.
vkd3d-shader/hlsl: Declare vars individually when parsing regular declarations.
vkd3d-shader/hlsl: Split declare_vars().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/250
These replace Wine's 14 copies of debugstr_hstring.
--
v3: wintypes: Replace debugstr_hstring with debugstr_h.
windows.ui: Replace debugstr_hstring with debugstr_h.
windows.system.profile.systemmanufacturers: Replace debugstr_hstring with debugstr_h.
windows.perception.stub: Replace debugstr_hstring with debugstr_h.
windows.networking: Replace debugstr_hstring with debugstr_h.
windows.media: Replace debugstr_hstring with debugstr_h.
windows.media.speech/tests: Replace debugstr_hstring with debugstr_h.
windows.media.speech: Replace debugstr_hstring with debugstr_h.
windows.globalization: Replace debugstr_hstring with debugstr_h.
windows.devices.enumeration: Replace debugstr_hstring with debugstr_h.
threadpoolwinrt: Replace debugstr_hstring with debugstr_h.
graphicscapture: Replace debugstr_hstring with debugstr_h.
cryptowinrt: Replace debugstr_hstring with debugstr_h.
combase: Replace debugstr_hstring with debugstr_h.
include: Introduce wine_dbgstr_h and debugstr_h.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3157
On Sun Jul 2 20:51:00 2023 +0000, Alex Henrie wrote:
> atlbase.h, atlcom.h, and atlwin.h are also C++-only in Windows, but Wine
> allows them to be used in C and uses them in its own C code. I assumed
> that the same logic would apply to atlconv.h, but if that doesn't work
> then we may want to introduce a new helper in include/wine.
We have the other headers but we use them only for the ATL implementation. They are not something we'd want to use globally.
As for a new include/wine helper, there doesn't seem to be enough usage of that function to justify it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3191#note_37561