fix SWIG warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10120 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0362693bd2
commit
35c07c0b67
2 changed files with 3 additions and 45 deletions
|
|
@ -1,43 +1,8 @@
|
|||
%module copy_struct
|
||||
|
||||
struct A {
|
||||
int i;
|
||||
unsigned int ui;
|
||||
double d;
|
||||
char* str;
|
||||
int **tmp;
|
||||
};
|
||||
|
||||
struct A getA();
|
||||
struct A* getARef();
|
||||
|
||||
typedef struct {
|
||||
int invisible;
|
||||
} B;
|
||||
|
||||
struct C {
|
||||
int invisible;
|
||||
double blind;
|
||||
};
|
||||
|
||||
typedef B C;
|
||||
|
||||
B* getBRef();
|
||||
struct C* getCRef();
|
||||
|
||||
C* getCCRef();
|
||||
|
||||
%feature("opaque", "yes") B;
|
||||
%feature("opaque", "yes") C;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int x;
|
||||
double u;
|
||||
} D;
|
||||
|
||||
|
||||
%inline %{
|
||||
struct A {
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -1,17 +1,9 @@
|
|||
%module simple_array
|
||||
|
||||
extern int x[10];
|
||||
extern double y[7];
|
||||
|
||||
|
||||
struct BarArray {
|
||||
int i;
|
||||
double d;
|
||||
};
|
||||
|
||||
extern struct BarArray bars[2];
|
||||
|
||||
void initArray();
|
||||
|
||||
%inline %{
|
||||
|
||||
struct BarArray {
|
||||
|
|
@ -19,6 +11,7 @@ struct BarArray {
|
|||
double d;
|
||||
};
|
||||
|
||||
extern struct BarArray bars[2];
|
||||
|
||||
int x[10];
|
||||
double y[7];
|
||||
|
|
@ -46,4 +39,4 @@ initArray()
|
|||
return;
|
||||
}
|
||||
|
||||
%}
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue