From 5e93f49c97a5c2e785a125bf948db41250b701f1 Mon Sep 17 00:00:00 2001 From: "gergely.erdelyi" Date: Sun, 13 Sep 2009 17:37:04 +0000 Subject: [PATCH] python.cpp: More places allow breaking of long-running scripts. Thanks Elias for the patch! --- python.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python.cpp b/python.cpp index 3895fde..eab3309 100644 --- a/python.cpp +++ b/python.cpp @@ -499,7 +499,9 @@ bool idaapi IDAPython_extlang_calcexpr(ea_t /*current_ea*/, PyObject *globals = PyModule_GetDict(module); + begin_execution(); result = PyRun_String(expr, Py_eval_input, globals, globals); + end_execution(); VarFree(rv); @@ -530,7 +532,9 @@ void enable_extlang_python(bool enable) /* Execute a line in the Python CLI */ bool idaapi IDAPython_cli_execute_line(const char *line) { + begin_execution(); PyRun_SimpleString(line); + end_execution(); return true; } @@ -608,7 +612,9 @@ bool IDAPython_Init(void) VER_PATCH, VER_STATUS, VER_SERIAL); + begin_execution(); PyRun_SimpleString(tmp); + end_execution(); /* Pull in the Python side of init */ qmakepath(tmp, MAXSTR, idadir(PYTHON_DIR_NAME), "init.py", NULL);