|
HAL
v4.5.0-124-g47ab54673
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
Functions | |
| template<typename T > | |
| py::handle | existing_wrapper (const T *object) |
| py::handle | owner_of (py::handle object) |
| void | keep_owner_alive (py::detail::function_call &call, py::handle value, py::handle receiver) |
| py::handle hal::python_bindings_detail::existing_wrapper | ( | const T * | object | ) |
Get the Python wrapper of an object, without ever creating one.
Definition at line 141 of file python_bindings.h.
Referenced by owner_of().
|
inline |
Keep the owner of a returned object alive for as long as Python refers to the object.
Applies to each element of a returned container. The container itself cannot be linked to anything, as a Python list is not a pybind11 type and has no slot to hold a reference in. This is also why the work cannot be left to py::keep_alive, which fails on a container.
Definition at line 203 of file python_bindings.h.
References owner_of().
Referenced by pybind11::detail::process_attribute< hal::borrowed >::postcall().
|
inline |
Get the object that has to outlive the given one.
Definition at line 163 of file python_bindings.h.
References existing_wrapper(), and hal::gate_library_manager::get_gate_library().
Referenced by keep_owner_alive().