Skip to content

Conversation

@jmalkin
Copy link
Contributor

@jmalkin jmalkin commented Jan 31, 2024

3 main changes:

  • Fix dual C++/Python object handling in tuple and density to avoid leaking objects
  • Ensure __str__ method always calls default to_string() and cannot accept parameters
  • Add explicit tests of to_string() and __str__ to all tests
  • NOMINSIZE in CMakeLists.txt to override Nanobind's -Os compiler flag

I'm not sure why a regular call to &sketch_type::to_string sometimes fails. Maybe I need to cast the the right type? But in a few places I used a lambda when it dind't seem necessary just because it worked.

If this looks good, I'll cherry-pick it into the 5.0.x branch.

…ling, ensure __str__ takes no parameters, test to_string methods
@jmalkin
Copy link
Contributor Author

jmalkin commented Jan 31, 2024

The ref changes are based on the documentation here: https://nanobind.readthedocs.io/en/latest/ownership_adv.html#intrusive-reference-counting

@jmalkin jmalkin merged commit 5cdd61f into main Jan 31, 2024
@jmalkin jmalkin deleted the release_fixes branch January 31, 2024 22:44
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.

2 participants