lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r950790 - in /lucene/pylucene/trunk/jcc: CHANGES jcc/python.py
Date Wed, 02 Jun 2010 22:11:36 GMT
Author: vajda
Date: Wed Jun  2 22:11:36 2010
New Revision: 950790

URL: http://svn.apache.org/viewvc?rev=950790&view=rev
Log:
   - fixed bug with not enforcing Iterable for iterator method detection

Modified:
    lucene/pylucene/trunk/jcc/CHANGES
    lucene/pylucene/trunk/jcc/jcc/python.py

Modified: lucene/pylucene/trunk/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/CHANGES?rev=950790&r1=950789&r2=950790&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/CHANGES (original)
+++ lucene/pylucene/trunk/jcc/CHANGES Wed Jun  2 22:11:36 2010
@@ -21,6 +21,7 @@ Version 2.5 ->
  - added support for --import
  - added read-only env.classpath property
  - config.py now written only during build or when missing (Christian Heimes)
+ - fixed bug with not enforcing Iterable for iterator method detection
  - 
 
 Version 2.4 -> 2.5

Modified: lucene/pylucene/trunk/jcc/jcc/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/python.py?rev=950790&r1=950789&r2=950790&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/python.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/python.py Wed Jun  2 22:11:36 2010
@@ -585,6 +585,7 @@ def python(env, out_h, out, cls, superCl
     line(out_h, indent + 1, 'static void initialize(PyObject *module);')
     line(out_h, indent, '};')
 
+    iterable = findClass('java/lang/Iterable')
     iterator = findClass('java/util/Iterator')
     enumeration = findClass('java/util/Enumeration')
 
@@ -724,6 +725,7 @@ def python(env, out_h, out, cls, superCl
         modifiers = method.getModifiers()
         if name == 'iterator' and iteratorMethod is None:
             if (not method.getParameterTypes() and
+                iterable.isAssignableFrom(cls) and
                 iterator.isAssignableFrom(method.getReturnType())):
                 iteratorMethod = method
         elif name == 'next' and nextMethod is None:



Mime
View raw message