It is not possible to call a function recursively that has been added to a class/struct using %extend, since it gets renamed, but the call doesn’t.
A workaround is to declare a static function which does the job using recursion, and to call that function in %extend.
However, the documentation should warn for this. The renaming scheme is mentioned in http://www.swig.org/Doc1.3/SWIGDocumentation.html#SWIG_adding_member_functions, but not explicitly.
See news://news.gmane.org:119/fnkp82$9kl$1@ger.gmane.org and followups for a description of my problem.
Logged In: YES
user_id=14972
Originator: NO
A patch against the documentation would be most appreciated.
Addressed by 11009f8e23faaf8047e00bf93c50f8a70c6d9784 I've just pushed to git master.