Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define constants and c_int aliases earlier than others in wrapper modules #527

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

junkmd
Copy link
Collaborator

@junkmd junkmd commented Apr 15, 2024

I have noticed something while fixing the bug reported in #524.

In the wrapper module, members of an enumeration are defined as module-level constants.
If they have the same name as a previously defined interface or CoClass, it will overwrite the definition.

The order of type information parsed from the COM library is optimized for the environment, so it is not always fixed.
In other words, symbols with duplicate names cannot be identified as to what type or value they are until the module is generated.

To ensure that the values of constants do not overwrite interfaces or CoClasses, codegenerator generates the codebase that defines the constants before them.

@junkmd junkmd added this to the 1.4.2 milestone Apr 15, 2024
junkmd added a commit to junkmd/pywinauto that referenced this pull request Apr 15, 2024
@junkmd
Copy link
Collaborator Author

junkmd commented Apr 15, 2024

@junkmd junkmd merged commit 7fc1cce into enthought:main Apr 15, 2024
25 checks passed
@junkmd junkmd deleted the early_enum_defs branch April 15, 2024 11:54
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