add the 'naturalvar' option/mode/feature, to allow member variables to be treated in a natural way, as the global ones. This mean use the const SWIGTYPE &(C++)/SWIGTYPE(C) typemaps instead of the plain SWIGTYPE * typemap for the set/get methods. Also add macros for CharLeak/SwigtypeLeak warnings.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8093 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-27 22:03:03 +00:00
commit 7f20614b3b

View file

@ -116,6 +116,15 @@
#define %nofastdispatch %feature("fastdispatch","0")
#define %clearfastdispatch %feature("fastdispatch","")
/* directors directives */
#define %director %feature("director")
#define %nodirector %feature("director","0")
#define %cleardirector %feature("director","")
/* naturalvar directives */
#define %naturalvar %feature("naturalvar")
#define %nonaturalvar %feature("naturalvar","0")
#define %clearnaturalvar %feature("naturalvar","")
/* Common features */
@ -123,7 +132,10 @@
#define %warnfilter(...) %feature("warnfilter",`__VA_ARGS__`)
/* Warnings used in typemaps. Macro names are the same as those in swigwarn.h but prefixed by SWIG_. */
%define SWIG_WARN_TYPEMAP_CHARLEAK "451:Setting const char * member may leak memory." %enddef
%define SWIG_WARN_TYPEMAP_SWIGTYPELEAK "454:Setting a pointer/reference variable may leak memory." %enddef
%define SWIG_WARN_TYPEMAP_THREAD_UNSAFE "470:Thread/reentrant unsafe wrapping, consider returning by value instead." %enddef
%define SWIG_WARN_TYPEMAP_DIRECTOROUT_PTR "473:Returning a pointer or reference is not recommended, consider returning 'by value' instead." %enddef
/* Contract support - Experimental and undocumented */