Lines Matching refs:PythonObject
38 template <> Expected<bool> python::As<bool>(Expected<PythonObject> &&obj) { in As()
45 Expected<long long> python::As<long long>(Expected<PythonObject> &&obj) { in As()
53 python::As<unsigned long long>(Expected<PythonObject> &&obj) { in As()
60 Expected<std::string> python::As<std::string>(Expected<PythonObject> &&obj) { in As()
81 void PythonObject::Reset() { in Reset()
95 Expected<long long> PythonObject::AsLongLong() const { in AsLongLong()
105 Expected<long long> PythonObject::AsUnsignedLongLong() const { in AsUnsignedLongLong()
116 Expected<unsigned long long> PythonObject::AsModuloUnsignedLongLong() const { in AsModuloUnsignedLongLong()
132 void PythonObject::Dump(Stream &strm) const { in Dump()
152 PyObjectType PythonObject::GetObjectType() const { in GetObjectType()
181 PythonString PythonObject::Repr() const { in Repr()
190 PythonString PythonObject::Str() const { in Str()
199 PythonObject
200 PythonObject::ResolveNameWithDictionary(llvm::StringRef name, in ResolveNameWithDictionary()
204 PythonObject result = dict.GetItemForKey(PythonString(piece)); in ResolveNameWithDictionary()
215 PythonObject PythonObject::ResolveName(llvm::StringRef name) const { in ResolveName()
235 PythonObject parent = ResolveName(name.substr(0, dot_pos)); in ResolveName()
237 return PythonObject(); in ResolveName()
243 bool PythonObject::HasAttribute(llvm::StringRef attr) const { in HasAttribute()
250 PythonObject PythonObject::GetAttributeValue(llvm::StringRef attr) const { in GetAttributeValue()
252 return PythonObject(); in GetAttributeValue()
256 return PythonObject(); in GetAttributeValue()
258 return PythonObject(PyRefType::Owned, in GetAttributeValue()
262 StructuredData::ObjectSP PythonObject::CreateStructuredObject() const { in CreateStructuredObject()
287 PythonObject(PyRefType::Borrowed, m_py_obj))); in CreateStructuredObject()
524 PythonObject PythonList::GetItemAtIndex(uint32_t index) const { in GetItemAtIndex()
526 return PythonObject(PyRefType::Borrowed, PyList_GetItem(m_py_obj, index)); in GetItemAtIndex()
527 return PythonObject(); in GetItemAtIndex()
530 void PythonList::SetItemAtIndex(uint32_t index, const PythonObject &object) { in SetItemAtIndex()
539 void PythonList::AppendItem(const PythonObject &object) { in AppendItem()
551 PythonObject obj = GetItemAtIndex(i); in CreateStructuredArray()
568 PythonTuple::PythonTuple(std::initializer_list<PythonObject> objects) { in PythonTuple()
584 PythonObject object(PyRefType::Borrowed, py_object); in PythonTuple()
603 PythonObject PythonTuple::GetItemAtIndex(uint32_t index) const { in GetItemAtIndex()
605 return PythonObject(PyRefType::Borrowed, PyTuple_GetItem(m_py_obj, index)); in GetItemAtIndex()
606 return PythonObject(); in GetItemAtIndex()
609 void PythonTuple::SetItemAtIndex(uint32_t index, const PythonObject &object) { in SetItemAtIndex()
622 PythonObject obj = GetItemAtIndex(i); in CreateStructuredArray()
654 PythonObject PythonDictionary::GetItemForKey(const PythonObject &key) const { in GetItemForKey()
658 return PythonObject(); in GetItemForKey()
663 Expected<PythonObject>
664 PythonDictionary::GetItem(const PythonObject &key) const { in GetItem()
672 return Retain<PythonObject>(o); in GetItem()
675 Expected<PythonObject> PythonDictionary::GetItem(const Twine &key) const { in GetItem()
683 return Retain<PythonObject>(o); in GetItem()
686 Error PythonDictionary::SetItem(const PythonObject &key, in SetItem()
687 const PythonObject &value) const { in SetItem()
697 const PythonObject &value) const { in SetItem()
706 void PythonDictionary::SetItemForKey(const PythonObject &key, in SetItemForKey()
707 const PythonObject &value) { in SetItemForKey()
719 PythonObject key = keys.GetItemAtIndex(i); in CreateStructuredDictionary()
720 PythonObject value = GetItemForKey(key); in CreateStructuredDictionary()
743 Expected<PythonObject> PythonModule::Get(const Twine &name) { in Get()
752 return Retain<PythonObject>(item); in Get()
808 Expected<PythonObject> pyarginfo = get_arg_info(*this); in GetArgInfo()
834 PythonObject im_self = GetAttributeValue("im_self"); in GetArgInfo()
840 PythonObject __call__ = GetAttributeValue("__call__"); in GetArgInfo()
845 PythonObject im_self = __callable__.GetAttributeValue("im_self"); in GetArgInfo()
874 PythonObject PythonCallable::operator()() { in operator ()()
875 return PythonObject(PyRefType::Owned, PyObject_CallObject(m_py_obj, nullptr)); in operator ()()
878 PythonObject PythonCallable::
881 return PythonObject(PyRefType::Owned, in operator ()()
885 PythonObject PythonCallable::
886 operator()(std::initializer_list<PythonObject> args) { in operator ()()
888 return PythonObject(PyRefType::Owned, in operator ()()
1011 GetOptionsForPyObject(const PythonObject &obj) { in GetOptionsForPyObject()
1115 static Expected<PythonBuffer> Create(PythonObject &obj, in Create()
1206 auto pybuffer = Take<PythonObject>(pybuffer_p); in Write()
1438 Take<PythonObject>(o); in Init()
1447 llvm::Expected<PythonObject>
1463 auto code_ref = Take<PythonObject>(code); in runStringOneLine()
1470 return Take<PythonObject>(result); in runStringOneLine()
1473 llvm::Expected<PythonObject>
1483 return Take<PythonObject>(result); in runStringMultiLine()