summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/finishSwigPythonLLDB.py
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-10-03 08:44:33 +0000
committerPavel Labath <pavel@labath.sk>2019-10-03 08:44:33 +0000
commit0577a0cedbc5be4cd4c20ba53d3dbdac6bff9a0a (patch)
tree9a0a0dec3b41ed61da7bd9e4fed2cc4b4c81fa2a /lldb/scripts/Python/finishSwigPythonLLDB.py
parentecd849ed5696fac0ac6a6eb8f7ec9d1034cb7a40 (diff)
downloadbcm5719-llvm-0577a0cedbc5be4cd4c20ba53d3dbdac6bff9a0a.tar.gz
bcm5719-llvm-0577a0cedbc5be4cd4c20ba53d3dbdac6bff9a0a.zip
"Fix" TestFileHandle.py on non-darwin platforms
This test exposed a very long standing issue that the python file objects returned by the FILE* typemap were unusable on non-darwin platforms. The reason they work on darwin is that they rely on a non-standard extension to fetch the "mode" of a FILE* object. On other platforms, this code was #ifdefed out, and so we were returning an empty mode. As there's no portable way to get this information, I just change the non-darwin path to return "r+", which should permit both reading and writing operations on the object. If the underlying file descriptor turns out to be incompatible with this mode, the operating system should return EBADF (or equivalent), instead of the "file not open for XXX" error from python. llvm-svn: 373573
Diffstat (limited to 'lldb/scripts/Python/finishSwigPythonLLDB.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud