diff --git a/idapython.vcxproj b/idapython.vcxproj index 854ee02..f5e81e4 100644 --- a/idapython.vcxproj +++ b/idapython.vcxproj @@ -1,5 +1,5 @@  - + Debug64 @@ -27,25 +27,25 @@ DynamicLibrary false MultiByte - v110 + v120 DynamicLibrary false MultiByte - v110 + v120 DynamicLibrary false MultiByte - v110 + v120 DynamicLibrary false MultiByte - v110 + v120 diff --git a/pywraps/py_appcall.py b/pywraps/py_appcall.py index f407964..20a37bd 100644 --- a/pywraps/py_appcall.py +++ b/pywraps/py_appcall.py @@ -658,10 +658,12 @@ def test_pck_bv(): return 1 # ----------------------------------------------------------------------- +# Test work with local types def test_local_types(): (type, fields) = GetLocalTinfo(1) if not type: return -1 + decl = GetLocalType(1, PRTYPE_MULTI) if decl != "enum\n"\ + "{\n"\ @@ -697,7 +699,10 @@ def test_local_types(): + "} _tagINTERNETFEATURELIST\n": print "decl = " + decl return -2 + return 1 + +# ----------------------------------------------------------------------- # various tests def test1(stage): # call a method that takes a string buffer and appends a dot to its end diff --git a/pywraps/py_kernwin.hpp b/pywraps/py_kernwin.hpp index b882ee2..50df98a 100644 --- a/pywraps/py_kernwin.hpp +++ b/pywraps/py_kernwin.hpp @@ -5,6 +5,30 @@ // //------------------------------------------------------------------------ +//------------------------------------------------------------------------ +/* +# +def read_selection(): + """ + Returns selected area boundaries + + @return: tuple(ok: bool, start_ea, end_ea) + """ + pass +# +*/ +static PyObject *py_read_selection() +{ + ea_t ea1, ea2; + bool b = read_selection(&ea1, &ea2); + + PYW_GIL_CHECK_LOCKED_SCOPE(); + return Py_BuildValue( + "(i" PY_FMT64 PY_FMT64 ")", + b ? 1 : 0, + pyul_t(ea1), pyul_t(ea2)); +} + //------------------------------------------------------------------------ /* # diff --git a/swig/graph.i b/swig/graph.i index 1871a92..af71529 100644 --- a/swig/graph.i +++ b/swig/graph.i @@ -936,4 +936,3 @@ class GraphViewer(CustomIDAMemo): # # %} - diff --git a/swig/idd.i b/swig/idd.i index f55489e..d8c5794 100644 --- a/swig/idd.i +++ b/swig/idd.i @@ -20,6 +20,7 @@ NO_PROCESS = 0xFFFFFFFF NO_THREAD = 0 # %} + %{ // diff --git a/swig/kernwin.i b/swig/kernwin.i index f3de499..43bb3d9 100644 --- a/swig/kernwin.i +++ b/swig/kernwin.i @@ -72,12 +72,18 @@ %rename (asktext) py_asktext; %rename (str2ea) py_str2ea; %rename (str2user) py_str2user; + %ignore process_ui_action; %rename (process_ui_action) py_process_ui_action; -%ignore execute_sync; + %ignore exec_request_t; + +%ignore execute_sync; %rename (execute_sync) py_execute_sync; +%ignore read_selection; +%rename (read_selection) py_read_selection; + %ignore ui_request_t; %ignore execute_ui_requests; %rename (execute_ui_requests) py_execute_ui_requests; @@ -139,6 +145,30 @@ SWIG_DECLARE_PY_CLINKED_OBJECT(textctrl_info_t) // //------------------------------------------------------------------------ +//------------------------------------------------------------------------ +/* +# +def read_selection(): + """ + Returns selected area boundaries + + @return: tuple(ok: bool, start_ea, end_ea) + """ + pass +# +*/ +static PyObject *py_read_selection() +{ + ea_t ea1, ea2; + bool b = read_selection(&ea1, &ea2); + + PYW_GIL_CHECK_LOCKED_SCOPE(); + return Py_BuildValue( + "(i" PY_FMT64 PY_FMT64 ")", + b ? 1 : 0, + pyul_t(ea1), pyul_t(ea2)); +} + //------------------------------------------------------------------------ /* # @@ -1398,11 +1428,6 @@ static bool formchgcbfa_set_field_value( static size_t py_get_AskUsingForm() { - // Return a pointer to the function. Note that, although - // the C implementation of AskUsingForm_cv will do some - // Qt/txt widgets generation, the Python's ctypes - // implementation through which the call well go will first - // unblock other threads. No need to do it ourselves. return (size_t)AskUsingForm_c; } diff --git a/swig/pro.i b/swig/pro.i index 25ada89..c8860bc 100644 --- a/swig/pro.i +++ b/swig/pro.i @@ -127,7 +127,6 @@ public: const char *c_str() const { return self->c_str(); } }; - class qtype { public: const uchar *c_str() const { return self->c_str(); }