mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[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
This commit is contained in:
parent
67966b169b
commit
ee8236c524
@ -3,7 +3,7 @@
|
|||||||
#define PYKDEXT_VERSION_MAJOR 2
|
#define PYKDEXT_VERSION_MAJOR 2
|
||||||
#define PYKDEXT_VERSION_MINOR 0
|
#define PYKDEXT_VERSION_MINOR 0
|
||||||
#define PYKDEXT_VERSION_SUBVERSION 0
|
#define PYKDEXT_VERSION_SUBVERSION 0
|
||||||
#define PYKDEXT_VERSION_BUILDNO 10
|
#define PYKDEXT_VERSION_BUILDNO 11
|
||||||
|
|
||||||
#define __VER_STR2__(x) #x
|
#define __VER_STR2__(x) #x
|
||||||
#define __VER_STR1__(x) __VER_STR2__(x)
|
#define __VER_STR1__(x) __VER_STR2__(x)
|
||||||
|
@ -387,18 +387,19 @@ py(
|
|||||||
|
|
||||||
if (IsPy3())
|
if (IsPy3())
|
||||||
{
|
{
|
||||||
// óñòàíàâèëèâàåì ïèòîíîâñêèå àðãóìåíòû
|
|
||||||
std::vector<wchar_t*> pythonArgs(opts.args.size());
|
|
||||||
|
|
||||||
std::wstring scriptFileNameW = _bstr_t(scriptFileName.c_str());
|
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)
|
for (size_t i = 1; i < opts.args.size(); ++i)
|
||||||
{
|
argws[i] = _bstr_t(opts.args[i].c_str());
|
||||||
std::wstring argw = _bstr_t(opts.args[i].c_str());
|
|
||||||
pythonArgs[i] = const_cast<wchar_t*>(argw.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]);
|
PySys_SetArgv_Py3((int)opts.args.size(), &pythonArgs[0]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user