r285301 - Attempt to make clang-format.py python 3 - compatible.
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 27 08:15:23 PDT 2016
Author: alexfh
Date: Thu Oct 27 10:15:23 2016
New Revision: 285301
URL: http://llvm.org/viewvc/llvm-project?rev=285301&view=rev
Log:
Attempt to make clang-format.py python 3 - compatible.
Modified:
cfe/trunk/tools/clang-format/clang-format.py
Modified: cfe/trunk/tools/clang-format/clang-format.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format.py?rev=285301&r1=285300&r2=285301&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/clang-format.py (original)
+++ cfe/trunk/tools/clang-format/clang-format.py Thu Oct 27 10:15:23 2016
@@ -51,7 +51,7 @@ if vim.eval('exists("g:clang_format_fall
def main():
# Get the current text.
encoding = vim.eval("&encoding")
- buf = [ unicode(line, encoding) for line in vim.current.buffer ]
+ buf = [ line.decode(encoding) for line in vim.current.buffer ]
text = '\n'.join(buf)
# Determine range to format.
More information about the cfe-commits
mailing list