From 9a8f92ac526c5da62eee6fcd619629c368921b83 Mon Sep 17 00:00:00 2001 From: "gergely.erdelyi" Date: Tue, 27 Jan 2009 17:39:16 +0000 Subject: [PATCH] funcs.i: Added wrapper get_fchunk_referer(). Patch by Igor Skochinsky. --- swig/funcs.i | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/swig/funcs.i b/swig/funcs.i index eaeb20e..19a1b47 100644 --- a/swig/funcs.i +++ b/swig/funcs.i @@ -35,3 +35,13 @@ %clear(char *buf); %clear(char *optlibs); +%inline %{ +ea_t get_fchunk_referer(ea_t ea, size_t idx) +{ + func_t *pfn = get_fchunk(ea); + func_parent_iterator_t dummy(pfn); // read referer info + if ( idx >= pfn->refqty || pfn->referers == NULL ) + return BADADDR; + return pfn->referers[idx]; +} +%}