From: SourceForge.net <no...@so...> - 2006-10-30 17:33:01
|
Bugs item #1587093, was opened at 2006-10-30 10:17 Message generated for change (Comment added) made by beazley You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1587093&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: code generation (general) Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Petr Novotny (petr_novotny) Assigned to: David M. Beazley (beazley) Summary: Typemaps are ignored inside %extend block Initial Comment: I am extending a class. The typemaps that were declared outside the %extend{} block are ignored; the typemaps from within the block are used. machine!user:~/swigbug [321]> cat bug.i %module bug; class B { }; %typemap(out) int { print("Int typemap\n"); } %extend B { %typemap(out) long { print("long typemap\n"); } int fn1(); long fn2(); } machine!user:~/swigbug [322]> ../swig- 1.3.29/bin/swig -c++ -perl5 bug.i machine!user:~/swigbug [323]> grep typemap *cxx /* The TmpMask is for in/out typemaps that use temporal objects */ print("long typemap\n"); machine!user:~/swigbug [324]> The expected outcome is that the "grep" shows both "Int typemap" and "long typemap". What happens is that the "long typemap" (the one defined inside % extend block) is applied but the "Int typemap" (the one defined outside) is not. ---------------------------------------------------------------------- >Comment By: David M. Beazley (beazley) Date: 2006-10-30 17:32 Message: Logged In: YES user_id=7557 Not a bug. %extend extends the class in the place where the class is defined---typemaps must be in effect before the class definition. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1587093&group_id=1645 |