mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-30 21:14:20 +01:00
python.cpp: More places allow breaking of long-running scripts. Thanks Elias for the patch!
This commit is contained in:
parent
08ea62d8fa
commit
5e93f49c97
@ -499,7 +499,9 @@ bool idaapi IDAPython_extlang_calcexpr(ea_t /*current_ea*/,
|
|||||||
|
|
||||||
PyObject *globals = PyModule_GetDict(module);
|
PyObject *globals = PyModule_GetDict(module);
|
||||||
|
|
||||||
|
begin_execution();
|
||||||
result = PyRun_String(expr, Py_eval_input, globals, globals);
|
result = PyRun_String(expr, Py_eval_input, globals, globals);
|
||||||
|
end_execution();
|
||||||
|
|
||||||
VarFree(rv);
|
VarFree(rv);
|
||||||
|
|
||||||
@ -530,7 +532,9 @@ void enable_extlang_python(bool enable)
|
|||||||
/* Execute a line in the Python CLI */
|
/* Execute a line in the Python CLI */
|
||||||
bool idaapi IDAPython_cli_execute_line(const char *line)
|
bool idaapi IDAPython_cli_execute_line(const char *line)
|
||||||
{
|
{
|
||||||
|
begin_execution();
|
||||||
PyRun_SimpleString(line);
|
PyRun_SimpleString(line);
|
||||||
|
end_execution();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -608,7 +612,9 @@ bool IDAPython_Init(void)
|
|||||||
VER_PATCH,
|
VER_PATCH,
|
||||||
VER_STATUS,
|
VER_STATUS,
|
||||||
VER_SERIAL);
|
VER_SERIAL);
|
||||||
|
begin_execution();
|
||||||
PyRun_SimpleString(tmp);
|
PyRun_SimpleString(tmp);
|
||||||
|
end_execution();
|
||||||
|
|
||||||
/* Pull in the Python side of init */
|
/* Pull in the Python side of init */
|
||||||
qmakepath(tmp, MAXSTR, idadir(PYTHON_DIR_NAME), "init.py", NULL);
|
qmakepath(tmp, MAXSTR, idadir(PYTHON_DIR_NAME), "init.py", NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user