[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Warnings from the bindings

From: Philip Martin <philip_at_codematters.co.uk>
Date: Fri, 06 Apr 2018 22:44:54 +0100

Philip Martin <philip_at_codematters.co.uk> writes:

> Branko Čibej <brane_at_apache.org> writes:
>
>> And I don't see these, either. I checked the code and we explicitly use
>> a JNI local frame in the core loop of unparseExternals. Try as I might,
>> I can't see where all those local references could be coming from.
>
> ImmutableList::for_each appears to be the problem. The following ugly
> hack is not correct but does resolve the warning:

That is more complicated than necessary. iter.has_next is not the
problem, just the function call. Probably this is still fixing the
symptom rather than the underlying problem:

Index: subversion/bindings/javahl/native/jniwrapper/jni_list.hpp
===================================================================
--- subversion/bindings/javahl/native/jniwrapper/jni_list.hpp (revision 1828477)
+++ subversion/bindings/javahl/native/jniwrapper/jni_list.hpp (working copy)
@@ -173,7 +173,11 @@ class ImmutableList : public BaseImmutableList
     {
       Iterator iter(get_iterator());
       while (iter.has_next())
+ {
+ m_env.PushLocalFrame(10);
         function(T(m_env, NativeT(iter.next())));
+ m_env.PopLocalFrame();
+ }
       return function;
     }
 };

-- 
Philip
Received on 2018-04-06 23:45:01 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.