Lines Matching refs:ptr

212             const auto class_name = std::string(((PyTypeObject *) rec->scope.ptr())->tp_name);
290 if (rec->sibling && PYBIND11_INSTANCE_METHOD_CHECK(rec->sibling.ptr()))
291 rec->sibling = PYBIND11_INSTANCE_METHOD_GET_FUNCTION(rec->sibling.ptr());
295 if (PyCFunction_Check(rec->sibling.ptr())) {
296 auto rec_capsule = reinterpret_borrow<capsule>(PyCFunction_GET_SELF(rec->sibling.ptr()));
317 capsule rec_capsule(rec, [](void *ptr) {
318 destruct((detail::function_record *) ptr);
330 m_ptr = PyCFunction_NewEx(rec->def, rec_capsule.ptr(), scope_module.ptr());
335 m_ptr = rec->sibling.ptr();
393 m_ptr = PYBIND11_INSTANCE_METHOD_NEW(m_ptr, rec->scope.ptr());
439 const auto tinfo = get_type_info((PyTypeObject *) overloads->scope.ptr());
440 const auto pi = reinterpret_cast<instance *>(parent.ptr());
451 return none().release().ptr();
546 value = PyDict_GetItemString(kwargs.ptr(), arg.name);
551 kwargs = reinterpret_steal<dict>(PyDict_Copy(kwargs.ptr()));
554 PyDict_DelItemString(kwargs.ptr(), arg.name);
598 if (!kwargs.ptr())
629 if (result.ptr() != PYBIND11_TRY_NEXT_OVERLOAD)
648 if (overloaded && !second_pass.empty() && result.ptr() == PYBIND11_TRY_NEXT_OVERLOAD) {
658 if (result.ptr() != PYBIND11_TRY_NEXT_OVERLOAD) {
711 if (result.ptr() == PYBIND11_TRY_NEXT_OVERLOAD) {
713 return handle(Py_NotImplemented).inc_ref().ptr();
780 auto *pi = reinterpret_cast<instance *>(parent.ptr());
783 return result.ptr();
857 PyObject *obj = PyImport_ReloadModule(ptr());
873 PyModule_AddObject(ptr(), name, obj.inc_ref().ptr() /* steals a reference */);
882 return reinterpret_borrow<dict>(p ? p : module::import("__main__").attr("__dict__").ptr());
932 auto parent_tinfo = get_type_info((PyTypeObject *) rec.bases[0].ptr());
947 auto tinfo2 = get_type_info((PyTypeObject *) h.ptr());
950 mark_parents_nonsimple((PyTypeObject *) h.ptr());
979 attr(name) = property(fget.ptr() ? fget : none(),
980 fset.ptr() ? fset : none(),
1165 capture *ptr = new capture { std::forward<Func>(func) };
1166 install_buffer_funcs([](PyObject *obj, void *ptr) -> buffer_info* {
1170 return new buffer_info(((capture *) ptr)->func(caster));
1171 }, ptr);
1365 return h ? (detail::function_record *) reinterpret_borrow<capsule>(PyCFunction_GET_SELF(h.ptr()))
1432 if (((PyTypeObject *) arg.ptr())->tp_doc)
1433 docstring += std::string(((PyTypeObject *) arg.ptr())->tp_doc) + "\n\n";
1605 auto tinfo = all_type_info(Py_TYPE(nurse.ptr()));
1609 add_patient(nurse.ptr(), patient.ptr());
1753 PyObject *result = PyObject_Call((PyObject *) type, args.ptr(), nullptr);
2029 auto key = std::make_pair(type.ptr(), name);
2052 if (self_caller == self.ptr())
2070 Py_file_input, d.ptr(), d.ptr());