python.cpp: Added error handling to return_python_result()

python.cpp: Added plugin arguments to enable/disable exlang_python
python.cpp: Patch by Igor Skochinsky
This commit is contained in:
gergely.erdelyi 2009-01-27 17:52:36 +00:00
parent b97846eeae
commit 48301d9703

View File

@ -290,6 +290,9 @@ static bool return_python_result(idc_value_t *rv,
char *errbuf,
size_t errbufsize)
{
if (errbufsize > 0)
errbuf[0] = '\0';
if (result == NULL)
{
handle_python_error(errbuf, errbufsize);
@ -326,6 +329,7 @@ static bool return_python_result(idc_value_t *rv,
return true;
}
qsnprintf(errbuf, errbufsize, "ERROR: bad return value");
return false;
}
@ -706,6 +710,14 @@ void idaapi run(int arg)
IDAPython_ScriptBox();
break;
;;
case 3:
enable_extlang_python(true);
break;
;;
case 4:
enable_extlang_python(false);
break;
;;
default:
warning("IDAPython: unknown plugin argument %d", arg);
break;