-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove some automatic conversion and comparison
- Remove methods that allow comparing an object of type `CxxRef{T}` with one of type `T`. Note that other `Ref` types in Julia don't provide such methods either. - Remove `convert` methods from `SmartPointer` instances to to other types. In both cases, the goal is to avoid invalidations. To give an idea of how bad the removed methods were, consider the number of invalidations as computed with this snippet in a fresh Julia session: using SnoopCompileCore invalidations = @Snoopr using CxxWrap; length(invalidations) Before this patch, we get 20819 invalidations with Julia 1.8.4, and 13863 with Julia master. After this patch, this is down to just 2695 in 1.8.4, respectively 1480 in Julia master. The main issue with this patch is that it may break code relying on these convenience methods. However, the resulting failures should be easy to fix, and the fixed code should work fine with older CxxWrap versions. I would nevertheless suggest to mark this as a breaking change by following the appropriate semver rules.
- Loading branch information
Showing
5 changed files
with
5 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters