Skip to content

Conversation

@deralmas
Copy link
Contributor

Before this patch we removed both name and declname.

Turns out that the only node using name for a "label" (for lack of a better word) was Decl. The rest of the nodes encoded actual useful typenames.

This meant that, if the variable name and its type were the same (common thing with structs), we would erase both of them, which leads to broken signatures.

The fix is simple: do not touch name. The codegen seems more than happy to generate anonymized parameters like this, as tested on libdecor (which led me to this), libwayland-client-core, xlib, and pulseaudio (which didn't build on Godot though due to a missing type? seems unrelated)

Before this patch we removed both `name` and `declname`.

Turns out that the only node using `name` for a "label" (for lack of a
better word) was `Decl`. The rest of the nodes encoded actual useful
typenames.

This meant that, if the variable name and its type were the same (common
thing with `struct`s), we would erase _both_ of them, which leads to
broken signatures.

The fix is simple: do not touch `name`. The codegen seems more than
happy to generate anonymized parameters like this, as tested on libdecor
(which led me to this), libwayland-client-core, xlib, and pulseaudio
(which didn't build on Godot though due to a missing type? seems
unrelated)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant