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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user