mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-05 16:21:36 +00:00
Modernize FormatBacktrace() and make portable for Python 3.
llvm-svn: 253085
This commit is contained in:
1 parent
75b4be9a11
commit
2419f1d57c
3 files changed
+26
-21
No files matched your search
@@ -825,6 +825,14 @@ PythonModule::AddModule(llvm::StringRef module)
|
||||
return PythonModule(PyRefType::Borrowed, PyImport_AddModule(str.c_str()));
|
||||
}
|
||||
|
||||
|
||||
PythonModule
|
||||
PythonModule::ImportModule(llvm::StringRef module)
|
||||
{
|
||||
std::string str = module.str();
|
||||
return PythonModule(PyRefType::Owned, PyImport_ImportModule(str.c_str()));
|
||||
}
|
||||
|
||||
bool
|
||||
PythonModule::Check(PyObject *py_obj)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user