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:
parent
d3f2b889f4
commit
7f20614b3b
1 changed files with 12 additions and 0 deletions
12
Lib/swig.swg
12
Lib/swig.swg
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue