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:
Marcelo Matus 2005-11-02 12:50:52 +00:00
commit b59c0b0da2

View file

@ -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