Commit ee8236c5 authored by SND\ussrhero_cp's avatar SND\ussrhero_cp Committed by Mikhail I. Izmestev
Browse files

[pykd_ext_2.0] fixed : issue #14086 (invalid sys.argv values )

git-svn-id: https://pykd.svn.codeplex.com/svn@91206 9b283d60-5439-405e-af05-b73fd8c4d996
parent 67966b16
......@@ -3,7 +3,7 @@
#define PYKDEXT_VERSION_MAJOR 2
#define PYKDEXT_VERSION_MINOR 0
#define PYKDEXT_VERSION_SUBVERSION 0
#define PYKDEXT_VERSION_BUILDNO 10
#define PYKDEXT_VERSION_BUILDNO 11
#define __VER_STR2__(x) #x
#define __VER_STR1__(x) __VER_STR2__(x)
......
......@@ -387,18 +387,19 @@ py(
if (IsPy3())
{
//
std::vector<wchar_t*> pythonArgs(opts.args.size());
std::wstring scriptFileNameW = _bstr_t(scriptFileName.c_str());
pythonArgs[0] = const_cast<wchar_t*>(scriptFileNameW.c_str());
//
std::vector<std::wstring> argws(opts.args.size());
argws[0] = scriptFileNameW;
for (size_t i = 1; i < opts.args.size(); ++i)
{
std::wstring argw = _bstr_t(opts.args[i].c_str());
pythonArgs[i] = const_cast<wchar_t*>(argw.c_str());
}
argws[i] = _bstr_t(opts.args[i].c_str());
std::vector<wchar_t*> pythonArgs(opts.args.size());
for (size_t i = 0; i < opts.args.size(); ++i)
pythonArgs[i] = const_cast<wchar_t*>(argws[i].c_str());
PySys_SetArgv_Py3((int)opts.args.size(), &pythonArgs[0]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment