From 03bcd88f1195a68693a1ea2257fe802f6e3b2096 Mon Sep 17 00:00:00 2001 From: "SND\\ussrhero_cp" Date: Thu, 2 Mar 2017 17:28:56 +0000 Subject: [PATCH] [pykd_ext_2.0] fixed : hang up python console git-svn-id: https://pykd.svn.codeplex.com/svn@91185 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd_ext/pyinterpret.cpp | 9 ++++----- pykd_ext/version.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pykd_ext/pyinterpret.cpp b/pykd_ext/pyinterpret.cpp index 9bab51a..c9c1315 100644 --- a/pykd_ext/pyinterpret.cpp +++ b/pykd_ext/pyinterpret.cpp @@ -205,22 +205,21 @@ public: module = m_modules[std::make_pair(majorVersion, minorVersion)]; } + module->PyEval_RestoreThread(module->m_globalState); + module->checkPykd(); + if (global) { if (module->m_globalInterpreter == 0) { - module->PyEval_RestoreThread(module->m_globalState); - module->checkPykd(); module->m_globalInterpreter = new PythonInterpreter(module); - } + } m_currentInterpreter = module->m_globalInterpreter; m_currentIsGlobal = true; } else { - module->PyEval_RestoreThread(module->m_globalState); - module->checkPykd(); m_currentInterpreter = new PythonInterpreter(module); m_currentIsGlobal = false; } diff --git a/pykd_ext/version.h b/pykd_ext/version.h index 65b6d93..1139188 100644 --- a/pykd_ext/version.h +++ b/pykd_ext/version.h @@ -3,7 +3,7 @@ #define PYKDEXT_VERSION_MAJOR 2 #define PYKDEXT_VERSION_MINOR 0 #define PYKDEXT_VERSION_SUBVERSION 0 -#define PYKDEXT_VERSION_BUILDNO 9 +#define PYKDEXT_VERSION_BUILDNO 10 #define __VER_STR2__(x) #x #define __VER_STR1__(x) __VER_STR2__(x)