One more example, for variables
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@10792 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6c646831c3
commit
52dd40260d
2 changed files with 27 additions and 19 deletions
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
typedef struct {
|
||||
int x,y;
|
||||
} Point;
|
||||
} Point; /*!< Description of struct Point */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,24 +6,24 @@
|
|||
|
||||
/* Some global variable declarations */
|
||||
%inline %{
|
||||
extern int ivar;
|
||||
extern short svar;
|
||||
extern long lvar;
|
||||
extern unsigned int uivar;
|
||||
extern unsigned short usvar;
|
||||
extern unsigned long ulvar;
|
||||
extern signed char scvar;
|
||||
extern unsigned char ucvar;
|
||||
extern char cvar;
|
||||
extern float fvar;
|
||||
extern double dvar;
|
||||
extern char *strvar;
|
||||
extern const char cstrvar[];
|
||||
extern int *iptrvar;
|
||||
extern char name[256];
|
||||
extern int ivar; /*!< Description of ivar */
|
||||
extern short svar; /*!< Description of svar */
|
||||
extern long lvar; /*!< Description of lvar */
|
||||
extern unsigned int uivar; /*!< Description of uivar */
|
||||
extern unsigned short usvar; /*!< Description of usvar */
|
||||
extern unsigned long ulvar; /*!< Description of ulvar */
|
||||
extern signed char scvar; /*!< Description of scvar */
|
||||
extern unsigned char ucvar; /*!< Description of ucvar */
|
||||
extern char cvar; /*!< Description of cvar */
|
||||
extern float fvar; /*!< Description of fvar */
|
||||
extern double dvar; /*!< Description of dvar */
|
||||
extern char *strvar; /*!< Description of strvar */
|
||||
extern const char cstrvar[]; /*!< Description of cstrvar */
|
||||
extern int *iptrvar; /*!< Description of iptrvar */
|
||||
extern char name[256]; /*!< Description of name */
|
||||
|
||||
extern Point *ptptr;
|
||||
extern Point pt;
|
||||
extern Point *ptptr; /*!< Description of ptrptr */
|
||||
extern Point pt; /*!< Description of pt */
|
||||
%}
|
||||
|
||||
|
||||
|
|
@ -40,8 +40,16 @@ extern char path[256];
|
|||
|
||||
/* Some helper functions to make it easier to test */
|
||||
%inline %{
|
||||
/*! this function prints variables
|
||||
\author someone */
|
||||
extern void print_vars();
|
||||
extern int *new_int(int value);
|
||||
extern int *new_int(int value); /*!< Description of new_int
|
||||
\param value the value
|
||||
\return a new int */
|
||||
/*! Description of new_point
|
||||
\param x the value x
|
||||
\param y the value y
|
||||
\return a new point */
|
||||
extern Point *new_Point(int x, int y);
|
||||
extern char *Point_print(Point *p);
|
||||
extern void pt_print();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue