Restrict the name used in %extend to be just the struct/class name and not a typedef to a class/struct. Typedefs were only partially working anyway. Anonymous struct typedefs excluded. Deprecate with a warning for now.
This commit is contained in:
parent
054f9dba1a
commit
b80f4dc5e2
10 changed files with 134 additions and 20 deletions
35
Examples/test-suite/errors/swig_extend.i
Normal file
35
Examples/test-suite/errors/swig_extend.i
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
%module xxx
|
||||
|
||||
typedef struct {
|
||||
int myint;
|
||||
} StructA;
|
||||
|
||||
typedef struct StructBName {
|
||||
int myint;
|
||||
} StructB;
|
||||
|
||||
typedef struct StructC {
|
||||
int myint;
|
||||
} StructC;
|
||||
|
||||
%extend StructA {
|
||||
void method() {}
|
||||
}
|
||||
|
||||
%extend StructB {
|
||||
void method() {}
|
||||
}
|
||||
|
||||
%extend StructC {
|
||||
void method() {}
|
||||
}
|
||||
|
||||
struct StructD {
|
||||
int myint;
|
||||
};
|
||||
typedef struct StructD StructDName;
|
||||
|
||||
%extend StructDName {
|
||||
void method() {}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue