Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Commit 29512d9

Browse files
Arnaud DiederenArnaud Diederen
authored andcommitted
IDAPython for IDA 8.1
1 parent 023c5ba commit 29512d9

17 files changed

Lines changed: 888 additions & 159 deletions

docs/howto/swig.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,27 @@ To achieve that, you want to use the `directorargout` typemap:
6464
"in output value of type 'qstrvec_t' in method '$symname'");
6565
}
6666
}
67+
68+
# "intercept" access to a structure/class field, in order to perform extra work
69+
70+
For example, `idainfo.lflags` bits should be set using proper setters,
71+
because they can have side-effects.
72+
73+
. tell swig to consider the member as unreachable:
74+
75+
%ignore idainfo::lflags;
76+
77+
. extend the type to "manually" provide the field:
78+
79+
%extend idainfo
80+
{
81+
// ...
82+
uint32 _get_lflags() const { return $self->lflags; }
83+
void _set_lflags(uint32 _f)
84+
{
85+
// do the job here
86+
}
87+
88+
%pythoncode {
89+
lflags = property(_get_lflags, _set_lflags)
90+
39.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)