[Lldb-commits] [PATCH] D18228: Make File option flags consistent for Python API

Francis Ricci via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 17 18:09:07 PDT 2016


fjricci updated this revision to Diff 51005.
fjricci added a comment.

Always use write flag, even in append mode


http://reviews.llvm.org/D18228

Files:
  source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp

Index: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
===================================================================
--- source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -1252,10 +1252,10 @@
     return llvm::StringSwitch<uint32_t>(mode.str().c_str())
     .Case("r",   File::eOpenOptionRead)
     .Case("w",   File::eOpenOptionWrite)
-    .Case("a",   File::eOpenOptionAppend|File::eOpenOptionCanCreate)
+    .Case("a",   File::eOpenOptionWrite|File::eOpenOptionAppend|File::eOpenOptionCanCreate)
     .Case("r+",  File::eOpenOptionRead|File::eOpenOptionWrite)
     .Case("w+",  File::eOpenOptionRead|File::eOpenOptionWrite|File::eOpenOptionCanCreate|File::eOpenOptionTruncate)
-    .Case("a+",  File::eOpenOptionRead|File::eOpenOptionWrite|File::eOpenOptionCanCreate)
+    .Case("a+",  File::eOpenOptionRead|File::eOpenOptionWrite|File::eOpenOptionAppend|File::eOpenOptionCanCreate)
     .Default(0);
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18228.51005.patch
Type: text/x-patch
Size: 1010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160318/5841a376/attachment.bin>


More information about the lldb-commits mailing list