1 %module abstract_typedef 2 3 4 %inline %{ 5 struct Engine 6 { 7 }; 8 9 struct AbstractBaseClass 10 { 11 virtual ~AbstractBaseClass() 12 { 13 } 14 15 virtual bool write(Engine& archive) const = 0; 16 }; 17 18 typedef Engine PersEngine; 19 typedef AbstractBaseClass PersClassBase; 20 21 22 class A : public PersClassBase 23 { 24 // This works always 25 // bool write(Engine& archive) const; 26 27 // This doesn't with Swig 1.3.17. 28 // But it works fine with 1.3.16 29 bool write(PersEngine& archive) const 30 { 31 return true; 32 } 33 34 35 }; 36 37 %} 38 39 40 /* 41 42 Problem related to the direct comparison of strings 43 in the file allocate.cxx (line 55) 44 45 ...... 46 String *local_decl = Getattr(dn,"decl"); 47 if (local_decl && !Strcmp(local_decl, base_decl)) { 48 ...... 49 50 with the direct string comparison, no equivalent types 51 are checked and the two 'write' functions appear to be 52 different because 53 54 "q(const).f(r.bss::PersEngine)." != "q(const).f(r.bss::Engine)." 55 56 */