You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could be open to making it public. Originally when we were first implementing the Bound API I was not sure how it would turn out, I think this trait has been nice.
The one thing I would like to consider before making it public, I'd like to experiment with an assume_owned_unchecked method which assumes the pointer is non nul without a runtime check. I have a suspicion there might be a few cases where it's acceptable to skip the check because the CPython API guarantees it, and it might be a slight performance win.
Another thing to consider briefly is at the moment Bound::from_owned_ptr is probably more coupled to Python API calls than it should be. If the pointer is null, the panic message will be "Python API call failed" and PyO3 will call PyErr_Print first. Probably that coupling should be removed.
what i want to have in my codebase:
what i have:
where private
assume_owned
is just:any particular reason to make
FfiPtrExt
private while we have publicBound
?The text was updated successfully, but these errors were encountered: