add SWIG_STATIC_POINTER helper
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7771 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5da979283b
commit
b59c0b0da2
1 changed files with 14 additions and 0 deletions
|
|
@ -69,3 +69,17 @@
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
Use this label for initialize a static pointer, as in
|
||||
|
||||
int a;
|
||||
int b;
|
||||
static PyObject *MyVar = SWIG_SATIC_POINTER(MyVar) NewSomething(..);
|
||||
...
|
||||
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
#define SWIG_STATIC_POINTER(var)
|
||||
#else
|
||||
#define SWIG_STATIC_POINTER(var) 0; if (!var) var =
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue