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
|
%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") B;
|
||||||
%feature("opaque", "yes") C;
|
%feature("opaque", "yes") C;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int x;
|
|
||||||
double u;
|
|
||||||
} D;
|
|
||||||
|
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct A {
|
struct A {
|
||||||
int i;
|
int i;
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,9 @@
|
||||||
%module simple_array
|
%module simple_array
|
||||||
|
|
||||||
extern int x[10];
|
extern int x[10];
|
||||||
extern double y[7];
|
extern double y[7];
|
||||||
|
|
||||||
|
|
||||||
struct BarArray {
|
|
||||||
int i;
|
|
||||||
double d;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct BarArray bars[2];
|
|
||||||
|
|
||||||
void initArray();
|
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
struct BarArray {
|
struct BarArray {
|
||||||
|
|
@ -19,6 +11,7 @@ struct BarArray {
|
||||||
double d;
|
double d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern struct BarArray bars[2];
|
||||||
|
|
||||||
int x[10];
|
int x[10];
|
||||||
double y[7];
|
double y[7];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue