diff --git a/out_of_tree/parsed_notifications.zip b/out_of_tree/parsed_notifications.zip index ee54bd7..855dfcc 100644 Binary files a/out_of_tree/parsed_notifications.zip and b/out_of_tree/parsed_notifications.zip differ diff --git a/pywraps/py_hexrays.py b/pywraps/py_hexrays.py index 0931876..01130b3 100644 --- a/pywraps/py_hexrays.py +++ b/pywraps/py_hexrays.py @@ -157,7 +157,7 @@ def cinsn_details(self): cinsn_t.details = property(cinsn_details) cfuncptr_t.__str__ = lambda self: str(self.__deref__()) -cfuncptr_t.__eq__ = lambda self, other: self.__ptrval__() == other.__ptrval__() +cfuncptr_t.__eq__ = lambda self, other: self.__ptrval__() == other.__ptrval__() if isinstance(other, cfuncptr_t) else False import ida_typeinf def cfunc_type(self): diff --git a/release_api_contents2.txt b/release_api_contents2.txt index 5a6a13b..c70f6fc 100644 --- a/release_api_contents2.txt +++ b/release_api_contents2.txt @@ -3737,10 +3737,6 @@ 'func_contains', 'func_does_return', 'func_has_stkframe_hole', - 'func_item_iterator_decode_preceding_insn', - 'func_item_iterator_decode_prev_insn', - 'func_item_iterator_next', - 'func_item_iterator_prev', 'func_item_iterator_t___next__', 'func_item_iterator_t_chunk', 'func_item_iterator_t_current', diff --git a/release_api_contents3.txt b/release_api_contents3.txt index 5e52274..f01ec93 100644 --- a/release_api_contents3.txt +++ b/release_api_contents3.txt @@ -3737,10 +3737,6 @@ 'func_contains', 'func_does_return', 'func_has_stkframe_hole', - 'func_item_iterator_decode_preceding_insn', - 'func_item_iterator_decode_prev_insn', - 'func_item_iterator_next', - 'func_item_iterator_prev', 'func_item_iterator_t___next__', 'func_item_iterator_t_chunk', 'func_item_iterator_t_current', diff --git a/release_pydoc_injections2.txt b/release_pydoc_injections2.txt index 6f31aea..ffbcb6f 100644 --- a/release_pydoc_injections2.txt +++ b/release_pydoc_injections2.txt @@ -12664,38 +12664,6 @@ func_does_return(*args) func_does_return(callee) -> bool @param callee (C++: ea_t) -Help on function func_item_iterator_decode_preceding_insn in module ida_funcs: - -func_item_iterator_decode_preceding_insn(*args) - func_item_iterator_decode_preceding_insn(fii, visited, p_farref, out) -> bool - fii: func_item_iterator_t * - visited: eavec_t * - p_farref: bool * - out: insn_t * - -Help on function func_item_iterator_decode_prev_insn in module ida_funcs: - -func_item_iterator_decode_prev_insn(*args) - func_item_iterator_decode_prev_insn(fii, out) -> bool - fii: func_item_iterator_t * - out: insn_t * - -Help on function func_item_iterator_next in module ida_funcs: - -func_item_iterator_next(*args) - func_item_iterator_next(fii, testf, ud) -> bool - fii: func_item_iterator_t * - testf: testf_t * - ud: void * - -Help on function func_item_iterator_prev in module ida_funcs: - -func_item_iterator_prev(*args) - func_item_iterator_prev(fii, testf, ud) -> bool - fii: func_item_iterator_t * - testf: testf_t * - ud: void * - Help on class func_item_iterator_t in module ida_funcs: class func_item_iterator_t(__builtin__.object) @@ -12709,9 +12677,8 @@ class func_item_iterator_t(__builtin__.object) | _ea: ea_t | | __next__(self, *args) - | __next__(self, func, ud) -> bool + | __next__(self, func) -> bool | func: testf_t * - | ud: void * | | __repr__ = _swig_repr(self) | @@ -12755,9 +12722,8 @@ class func_item_iterator_t(__builtin__.object) | next_not_tail(self) -> bool | | prev(self, *args) - | prev(self, func, ud) -> bool + | prev(self, func) -> bool | @param func (C++: testf_t *) - | @param ud (C++: void *) | | prev_addr(self, *args) | prev_addr(self) -> bool diff --git a/release_pydoc_injections3.txt b/release_pydoc_injections3.txt index edd7234..5c17042 100644 --- a/release_pydoc_injections3.txt +++ b/release_pydoc_injections3.txt @@ -12600,38 +12600,6 @@ func_does_return(*args) -> 'bool' func_does_return(callee) -> bool @param callee (C++: ea_t) -Help on function func_item_iterator_decode_preceding_insn in module ida_funcs: - -func_item_iterator_decode_preceding_insn(*args) -> 'bool' - func_item_iterator_decode_preceding_insn(fii, visited, p_farref, out) -> bool - fii: func_item_iterator_t * - visited: eavec_t * - p_farref: bool * - out: insn_t * - -Help on function func_item_iterator_decode_prev_insn in module ida_funcs: - -func_item_iterator_decode_prev_insn(*args) -> 'bool' - func_item_iterator_decode_prev_insn(fii, out) -> bool - fii: func_item_iterator_t * - out: insn_t * - -Help on function func_item_iterator_next in module ida_funcs: - -func_item_iterator_next(*args) -> 'bool' - func_item_iterator_next(fii, testf, ud) -> bool - fii: func_item_iterator_t * - testf: testf_t * - ud: void * - -Help on function func_item_iterator_prev in module ida_funcs: - -func_item_iterator_prev(*args) -> 'bool' - func_item_iterator_prev(fii, testf, ud) -> bool - fii: func_item_iterator_t * - testf: testf_t * - ud: void * - Help on class func_item_iterator_t in module ida_funcs: class func_item_iterator_t(builtins.object) @@ -12645,9 +12613,8 @@ class func_item_iterator_t(builtins.object) | _ea: ea_t | | __next__(self, *args) -> 'bool' - | __next__(self, func, ud) -> bool + | __next__(self, func) -> bool | func: testf_t * - | ud: void * | | __repr__ = _swig_repr(self) | @@ -12694,9 +12661,8 @@ class func_item_iterator_t(builtins.object) | next_not_tail(self) -> bool | | prev(self, *args) -> 'bool' - | prev(self, func, ud) -> bool + | prev(self, func) -> bool | @param func (C++: testf_t *) - | @param ud (C++: void *) | | prev_addr(self, *args) -> 'bool' | prev_addr(self) -> bool diff --git a/swig/funcs.i b/swig/funcs.i index b7b2e05..01ae82b 100644 --- a/swig/funcs.i +++ b/swig/funcs.i @@ -29,6 +29,12 @@ %template (dyn_ea_array) dynamic_wrapped_array_t; %template (dyn_regarg_array) dynamic_wrapped_array_t; +%ignore func_item_iterator_next; +%ignore func_item_iterator_prev; +%ignore func_item_iterator_decode_prev_insn; +%ignore func_item_iterator_decode_preceding_insn; +%ignore func_item_iterator_succ; + %extend func_t { dynamic_wrapped_array_t __get_points__() diff --git a/tools/deploy/header.i.in b/tools/deploy/header.i.in index 07e8842..50946c1 100644 --- a/tools/deploy/header.i.in +++ b/tools/deploy/header.i.in @@ -1828,6 +1828,29 @@ ${NONNULL_TYPEMAPS} $result = iobuf; } +%fragment("call_py_testf_t", "header") +{ + bool call_py_testf_t(flags_t flags, void *ud) + { + PYW_GIL_CHECK_LOCKED_SCOPE(); + PyObject *py_callable = (PyObject *) ud; + QASSERT(0, PyCallable_Check(py_callable)); + newref_t py_flags(PyLong_FromUnsignedLong(flags)); + newref_t result(PyObject_CallFunctionObjArgs(py_callable, py_flags.o, nullptr)); + return result != nullptr && PyObject_IsTrue(result.o); + } +} + +%typemap(in, fragment="call_py_testf_t") (testf_t *func, void *ud) +{ + // %typemap(in, fragment="call_py_testf_t") (testf_t *func, void *ud) + if ( !PyCallable_Check($input) ) + SWIG_exception_fail( + SWIG_TypeError, + "in method '" "$symname" "', argument " "$argnum"" of type 'callable'"); + $1 = call_py_testf_t; + $2 = $input; +} #endif // __HEADER_I__ // END: auto-inserted header