Lines Matching defs:scope

155             /* Function scope guard -- defaults to the compile-to-nothing `void_type` */
212 const auto class_name = std::string(((PyTypeObject *) rec->scope.ptr())->tp_name);
263 rec->scope.attr("__module__").cast<std::string>() + "." +
264 rec->scope.attr("__qualname__").cast<std::string>();
300 if (!chain->scope.is(rec->scope))
322 if (rec->scope) {
323 if (hasattr(rec->scope, "__module__")) {
324 scope_module = rec->scope.attr("__module__");
325 } else if (hasattr(rec->scope, "__name__")) {
326 scope_module = rec->scope.attr("__name__");
344 std::string(pybind11::str(rec->scope.attr("__name__"))) + "." + std::string(rec->name) + signature
393 m_ptr = PYBIND11_INSTANCE_METHOD_NEW(m_ptr, rec->scope.ptr());
439 const auto tinfo = get_type_info((PyTypeObject *) overloads->scope.ptr());
813 Create Python binding for a new function within the module scope. ``Func``
819 cpp_function func(std::forward<Func>(f), name(name_), scope(*this),
893 if (rec.scope && hasattr(rec.scope, rec.name))
975 const auto is_static = rec_func && !(rec_func->is_method && rec_func->scope);
1061 class_(handle scope, const char *name, const Extra &... extra) {
1073 record.scope = scope;
1121 cpp_function cf(std::forward<Func>(f), name(name_), scope(*this),
1204 cpp_function fget([pm](object) -> const D &{ return *pm; }, scope(*this)),
1205 fset([pm](object, const D &value) { *pm = value; }, scope(*this));
1212 cpp_function fget([pm](object) -> const D &{ return *pm; }, scope(*this));
1558 enum_(const handle &scope, const char *name, const Extra&... extra)
1559 : class_<Type>(scope, name, extra...), m_base(*this, scope) {
1579 /// Export enumeration entries into the parent scope
1782 exception(handle scope, const char *name, PyObject *base = PyExc_Exception) {
1783 std::string full_name = scope.attr("__name__").cast<std::string>() +
1786 if (hasattr(scope, name))
1789 scope.attr(name) = *this;
1813 exception<CppException> &register_exception(handle scope,
1817 if (!ex) ex = exception<CppException>(scope, name, base);
2017 error_scope scope;