minor code consistent style changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9002 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3e57edcf2a
commit
766cb3877b
1 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ namespace Swig {
|
|||
}
|
||||
|
||||
bool set(JNIEnv *jenv, jobject jobj, bool mem_own, bool weak_global) {
|
||||
if (jthis_ == NULL) {
|
||||
if (!jthis_) {
|
||||
weak_global_ = weak_global;
|
||||
if (jobj)
|
||||
jthis_ = ((weak_global_ || !mem_own) ? jenv->NewWeakGlobalRef(jobj) : jenv->NewGlobalRef(jobj));
|
||||
|
|
@ -59,7 +59,7 @@ namespace Swig {
|
|||
#if defined(DEBUG_DIRECTOR_OWNED)
|
||||
std::cout << "JObjectWrapper::release(" << jthis_ << "): " << (weak_global_ ? "weak global ref" : "global ref") << std::endl;
|
||||
#endif
|
||||
if (jthis_ != NULL) {
|
||||
if (jthis_) {
|
||||
if (weak_global_) {
|
||||
if (jenv->IsSameObject(jthis_, NULL) == JNI_FALSE)
|
||||
jenv->DeleteWeakGlobalRef((jweak)jthis_);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue