Unicode support on Win32.
Win32 API calls that are Unicode aware require wide character strings, but LLDB uses UTF8 everywhere. This patch does conversions wherever necessary when passing strings into and out of Win32 API calls. Patch by Cameron Differential Revision: http://reviews.llvm.org/D17107 Reviewed By: zturner, amccarth llvm-svn: 264074
This commit is contained in:
@@ -19,8 +19,11 @@
|
||||
|
||||
#include "lldb/Core/Stream.h"
|
||||
#include "lldb/Host/File.h"
|
||||
#include "lldb/Host/FileSystem.h"
|
||||
#include "lldb/Interpreter/ScriptInterpreter.h"
|
||||
|
||||
#include "llvm/Support/ConvertUTF.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
@@ -1162,9 +1165,7 @@ PythonFile::PythonFile(File &file, const char *mode)
|
||||
|
||||
PythonFile::PythonFile(const char *path, const char *mode)
|
||||
{
|
||||
FILE *fp = nullptr;
|
||||
fp = fopen(path, mode);
|
||||
lldb_private::File file(fp, true);
|
||||
lldb_private::File file(path, GetOptionsFromMode(mode));
|
||||
Reset(file, mode);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user