Fixes to remove "dereferencing type-punned pointer will break strict-aliasing rules" warnings in C wrappers when compiling C code with 'gcc -Wall -fstrict-aliasing'. Patch from Michael Cahill.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7192 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9bd7f1ec9a
commit
94e6c86d06
6 changed files with 33 additions and 24 deletions
|
|
@ -87,7 +87,7 @@ namespace Swig {
|
|||
jthis_ = jenv->NewWeakGlobalRef(jself);
|
||||
weak_global_ = true;
|
||||
}
|
||||
} else { /* Java releses ownership of C++ object's lifetime */
|
||||
} else { /* Java releases ownership of C++ object's lifetime */
|
||||
if (weak_global_) {
|
||||
jenv->DeleteWeakGlobalRef(jthis_);
|
||||
jthis_ = jenv->NewGlobalRef(jself);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue