MCPcopy Create free account
hub / github.com/pybind/pybind11 / set_pointer

Function set_pointer

include/pybind11/pytypes.h:2108–2112  ·  view source on GitHub ↗

Replaces a capsule's pointer *without* calling the destructor on the existing one.

Source from the content-addressed store, hash-verified

2106
2107 /// Replaces a capsule's pointer *without* calling the destructor on the existing one.
2108 void set_pointer(const void *value) {
2109 if (PyCapsule_SetPointer(m_ptr, const_cast<void *>(value)) != 0) {
2110 throw error_already_set();
2111 }
2112 }
2113
2114 const char *name() const {
2115 const char *name = PyCapsule_GetName(m_ptr);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected