PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/errors/cpp_extend_destructors.i

#
Swig | 104 lines | 85 code | 19 blank | 0 comment | 0 complexity | 2eca98c29eb1188634910be48bd91fa8 MD5 | raw file
  1%module xxx
  2
  3/////////////////////////////
  4%extend AStruct {
  5  ~AStruct() {}
  6}
  7struct AStruct {
  8  ~AStruct() {}
  9};
 10
 11/////////////////////////////
 12struct BStruct {
 13  ~BStruct() {}
 14  ~BStruct() {}
 15};
 16
 17/////////////////////////////
 18struct CStruct {
 19};
 20
 21%extend CStruct {
 22  ~NOT_CStruct() {
 23    delete $self;
 24  }
 25}
 26
 27%extend DStruct {
 28  ~NOT_DStruct() {
 29    delete $self;
 30  }
 31}
 32
 33struct DStruct {
 34};
 35
 36/////////////////////////////
 37struct EStruct {
 38  ~EStruct() {}
 39};
 40
 41%extend EStruct {
 42  ~NOT_EStruct() {
 43    delete $self;
 44  }
 45}
 46
 47%extend FStruct {
 48  ~NOT_FStruct() {
 49    delete $self;
 50  }
 51}
 52
 53struct FStruct {
 54  ~FStruct() {}
 55};
 56
 57/////////////////////////////
 58struct GStruct {
 59};
 60
 61%extend GStruct {
 62  ~GStruct() {}
 63  ~NOT_GStruct() {
 64    delete $self;
 65  }
 66}
 67
 68%extend HStruct {
 69  ~HStruct() {}
 70  ~NOT_HStruct() {
 71    delete $self;
 72  }
 73}
 74
 75struct HStruct {
 76};
 77
 78/////////////////////////////
 79struct IStruct {
 80  ~IStruct() {}
 81  ~NOT_IStruct() {}
 82};
 83
 84struct JStruct {
 85  ~JStruct() {}
 86  ~NOT_JStruct() {}
 87  ~JStruct() {}
 88};
 89
 90/////////////////////////////
 91struct KStruct {
 92  ~NOT_KStruct() {}
 93};
 94
 95/////////////////////////////
 96template<typename T>
 97struct LStruct {
 98  ~LStruct() {}
 99  ~NOT_LStruct() {}
100  ~LStruct() {}
101};
102%template(LStructInt) LStruct<int>;
103%template(LStructShort) LStruct<short>;
104