Use std::unique_ptr in pybind11_getbuffer#5435
Conversation
| // Fill in all the information, and then downgrade as requested by the caller, or raise an | ||
| // error if that's not possible. | ||
| view->obj = obj; | ||
| view->internal = info; |
There was a problem hiding this comment.
This looks good, but feels a little inconsistent, why move setting view->internal to the end while setting view->buf here from the same info object? I would keep them both together, and it would be good to explain why it is moved to the end if that is preferred.
I think in the case of error info is deleted and also info->ptr.
|
@cryos asked about the CI / 🐍 3 • Clang 11 • C++20 • x64 timeout offline: That's a flake / infrastructure issue that popped up a couple days ago. I've been triggering reruns for several PRs, to make them go away. (I'll do that here in a minute.) I hope the infrastructure issue will get fixed soon. It's not the first time that something like this happens here on GitHub. |
a3ff673 to
ef01e17
Compare
cryos
left a comment
There was a problem hiding this comment.
Thanks - looks good to me.
|
@rwgk the failure appears to be a timeout if you could restart please. |
Description
Implements the suggestion from #5407 (comment)
Not sure if this is the best way.