MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / weakref

Class weakref

extern/pybind/include/pybind11/pytypes.h:1928–1943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1926};
1927
1928class weakref : public object {
1929public:
1930 PYBIND11_OBJECT_CVT_DEFAULT(weakref, object, PyWeakref_Check, raw_weakref)
1931 explicit weakref(handle obj, handle callback = {})
1932 : object(PyWeakref_NewRef(obj.ptr(), callback.ptr()), stolen_t{}) {
1933 if (!m_ptr) {
1934 if (PyErr_Occurred()) {
1935 throw error_already_set();
1936 }
1937 pybind11_fail("Could not allocate weak reference!");
1938 }
1939 }
1940
1941private:
1942 static PyObject *raw_weakref(PyObject *o) { return PyWeakref_NewRef(o, nullptr); }
1943};
1944
1945class slice : public object {
1946public:

Callers 2

class_Class · 0.85
all_type_info_get_cacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected