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

Update to latest nanobind and python 3.12 support #167

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dtourolle
Copy link
Contributor

This is a very small change that updates the nanobind submodule to the current master (probably a bad idea, maybe a fixed version would be preferred?) and then changes some code around the Flags enum for buttons to get it working.

Why were these changes needed? The Flags enum was treated as an integer by some functions. It seems with the latests nanobind there has been some changes to the handling of enums, which meant the casting of a enum in python to an int for the bound function does not work. This is possible related to this.

The solution I found was to change the functions to accept enums and perform static_casts when int->enum is needed.

@dtourolle dtourolle changed the title Small changes to allow latest nanobind and python 3.12 support Update to latest nanobind and python 3.12 support Jun 6, 2024
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