From 115d225cf1895e2a9d7c514ffb36dfe703cb2264 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Thu, 27 Oct 2016 15:15:23 +0000 Subject: [PATCH] Attempt to make clang-format.py python 3 - compatible. llvm-svn: 285301 --- clang/tools/clang-format/clang-format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/tools/clang-format/clang-format.py b/clang/tools/clang-format/clang-format.py index 5a5f99b..aded301 100644 --- a/clang/tools/clang-format/clang-format.py +++ b/clang/tools/clang-format/clang-format.py @@ -51,7 +51,7 @@ if vim.eval('exists("g:clang_format_fallback_style")') == "1": 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. -- 2.7.4