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 am using the following helper struct to emulate boost::python::extract<T> in legacy code. For those who don't remember, it tried to extract c++ object from whatever was given to it, using the whole conversion machinery.
Can someone have a look whether the code is doing anything obviously wrong, especially regarding reference counting or similar low-level things? I now seeing crashes in this code (somewhere, not in the debug mode, so not sure exactly) and might get some hint from a review.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am using the following helper struct to emulate
boost::python::extract<T>
in legacy code. For those who don't remember, it tried to extract c++ object from whatever was given to it, using the whole conversion machinery.Can someone have a look whether the code is doing anything obviously wrong, especially regarding reference counting or similar low-level things? I now seeing crashes in this code (somewhere, not in the debug mode, so not sure exactly) and might get some hint from a review.
The usage is something like this:
Is there maybe some similar device in pybind11, perhaps just wrapping the cast attempt and exception catch logic in a nicer package?
Beta Was this translation helpful? Give feedback.
All reactions