Consistent warning 470 across all languages
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7123 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3da4dfe293
commit
67c4c4c91c
5 changed files with 8 additions and 5 deletions
|
|
@ -425,7 +425,7 @@ example.i(4): Syntax error in input.
|
|||
<li>467. Overloaded <em>declaration</em> not supported (no type checking rule for '<em>type</em>')
|
||||
<li>468. No 'throw' typemap defined for exception type <em>type</em>
|
||||
<li>469. No or improper directorin typemap defined for <em>type</em>
|
||||
<li>470. Possible thread/reentrant unsafe wrapping
|
||||
<li>470. Thread/reentrant unsafe wrapping, consider returning by value instead.
|
||||
<li>471. Unable to use return type <em>type</em> in director method
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class string;
|
|||
$1 = &$1_str;
|
||||
jenv->ReleaseStringUTFChars($input, $1_pstr); %}
|
||||
|
||||
%typemap(directorout,warning="470:Possible thread/reentrant unsafe wrapping, consider using a plain 'const string' or 'string' return type instead.") const string &
|
||||
%typemap(directorout,warning=SWIG_WARN_TYPEMAP_THREAD_UNSAFE) const string &
|
||||
%{if(!$input) {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
|
||||
return $null;
|
||||
|
|
@ -216,7 +216,7 @@ class wstring;
|
|||
%typemap(javadirectorin) const wstring & "$jniinput"
|
||||
%typemap(javadirectorout) const wstring & "$javacall"
|
||||
|
||||
%typemap(directorout,warning="470:Possible thread/reentrant unsafe wrapping, consider using a plain 'const wstring' or 'wstring' return type instead.") const wstring &
|
||||
%typemap(directorout,warning=SWIG_WARN_TYPEMAP_THREAD_UNSAFE) const wstring &
|
||||
%{if(!$input) {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::wstring");
|
||||
return $null;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
if (res == SWIG_NEWOBJ) delete ptr;
|
||||
}
|
||||
|
||||
%typemap(directorout,fragment=pyfrag,warning="470:Possible thread/reentrant unsafe wrapping, consider using a plain '"#Type"' return type instead.") const Type& {
|
||||
%typemap(directorout,fragment=pyfrag,warning=SWIG_WARN_TYPEMAP_THREAD_UNSAFE) const Type& {
|
||||
Type *ptr = 0;
|
||||
int res = $input ? asptr_meth($input, &ptr) : 0;
|
||||
if (!res || !ptr)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
if (!$input || PyErr_Occurred())
|
||||
Swig::DirectorTypeMismatchException::raise("Error converting Python object when using as_meth.");
|
||||
}
|
||||
%typemap(directorout,fragment=pyfrag,warning="470:Using thread/reentrant unsafe wrapping, consider using a plain '"#Type"' return type instead.") const Type& {
|
||||
%typemap(directorout,fragment=pyfrag,warning=SWIG_WARN_TYPEMAP_THREAD_UNSAFE) const Type& {
|
||||
if ($input) {
|
||||
static $basetype temp = SWIG_static_cast(SWIG_arg(as_meth($input)),$basetype);
|
||||
$result = &temp;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@
|
|||
/* Warnings */
|
||||
#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_THREAD_UNSAFE "470:Thread/reentrant unsafe wrapping, consider returning by value instead." %enddef
|
||||
|
||||
/* Contract support - Experimental and undocumented */
|
||||
|
||||
#define %contract %feature("contract")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue