Lines Matching defs:capsule
1145 class capsule : public object {
1147 PYBIND11_OBJECT_DEFAULT(capsule, object, PyCapsule_CheckExact)
1148 PYBIND11_DEPRECATED("Use reinterpret_borrow<capsule>() or reinterpret_steal<capsule>()")
1149 capsule(PyObject *ptr, bool is_borrowed) : object(is_borrowed ? object(ptr, borrowed_t{}) : object(ptr, stolen_t{})) { }
1151 explicit capsule(const void *value, const char *name = nullptr, void (*destructor)(PyObject *) = nullptr)
1154 pybind11_fail("Could not allocate capsule object!");
1158 capsule(const void *value, void (*destruct)(PyObject *))
1161 pybind11_fail("Could not allocate capsule object!");
1164 capsule(const void *value, void (*destructor)(void *)) {
1172 pybind11_fail("Could not allocate capsule object!");
1175 pybind11_fail("Could not set capsule context!");
1178 capsule(void (*destructor)()) {
1185 pybind11_fail("Could not allocate capsule object!");
1191 if (!result) pybind11_fail("Unable to extract capsule contents!");