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

Make DRW an option instead of raw pointer #38

Closed
wants to merge 4 commits into from
Closed

Make DRW an option instead of raw pointer #38

wants to merge 4 commits into from

Conversation

ntBre
Copy link
Owner

@ntBre ntBre commented Dec 5, 2024

With the reassurance of the new testing changes, this PR starts to remove some of the unsafe in the code base, starting with converting the global DRW context from a raw pointer to an Option<Drw>. It's obviously annoying to have to unwrap (or let else) all over the place, but this accurately captures the semantics of all the is_null checks in the unsafe case.

@ntBre
Copy link
Owner Author

ntBre commented Dec 6, 2024

I found a much better solution to this.

@ntBre ntBre closed this Dec 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