Lines Matching refs:m_py_obj
217 m_py_obj = py_obj;
222 if (m_py_obj && Py_IsInitialized() && type == PyRefType::Borrowed)
223 Py_XINCREF(m_py_obj);
227 : PythonObject(PyRefType::Borrowed, rhs.m_py_obj) {}
230 m_py_obj = rhs.m_py_obj;
231 rhs.m_py_obj = nullptr;
239 if (m_py_obj)
240 _PyObject_Dump(m_py_obj);
247 PyObject *get() const { return m_py_obj; }
250 PyObject *result = m_py_obj;
251 m_py_obj = nullptr;
257 m_py_obj = std::exchange(other.m_py_obj, nullptr);
286 bool IsNone() const { return m_py_obj == Py_None; }
288 bool IsValid() const { return m_py_obj != nullptr; }
295 if (!T::Check(m_py_obj))
297 return T(PyRefType::Borrowed, m_py_obj);
307 PyObject_CallMethod(m_py_obj, py2_const_cast(name),
317 PyObject *obj = PyObject_CallFunction(m_py_obj, py2_const_cast(format),
325 if (!m_py_obj)
327 PyObject *obj = PyObject_GetAttrString(m_py_obj, NullTerminated(name));
334 if (!m_py_obj)
336 int r = PyObject_IsTrue(m_py_obj);
350 if (!m_py_obj || !cls.IsValid())
352 int r = PyObject_IsInstance(m_py_obj, cls.get());
359 PyObject *m_py_obj = nullptr;