Update SWIG typemaps to use PythonFile.

Using the Python native C API is non-portable across Python versions,
so this patch changes them to use the `PythonFile` class which hides
the version specific differences behind a single interface.

llvm-svn: 250525
This commit is contained in:
Zachary Turner
2015-10-16 16:39:18 +00:00
parent 53bd975033
commit eda01c3175
3 changed files with 44 additions and 13 deletions

View File

@@ -323,7 +323,8 @@ public:
class PythonFile : public PythonObject
{
public:
explicit PythonFile(File &file, const char *mode);
PythonFile(File &file, const char *mode);
PythonFile(const char *path, const char *mode);
PythonFile(PyRefType type, PyObject *o);
~PythonFile() override;
@@ -333,6 +334,8 @@ class PythonFile : public PythonObject
void Reset(PyRefType type, PyObject *py_obj) override;
void Reset(File &file, const char *mode);
bool GetUnderlyingFile(File &file) const;
};
} // namespace lldb_private