[Jython-checkins] jython: fixed some issue in Py-constructor support-code from two commits before.

stefan.richthofer jython-checkins at python.org
Sat Sep 5 02:56:22 CEST 2015


https://hg.python.org/jython/rev/45a9d8f613b9
changeset:   7724:45a9d8f613b9
user:        Stefan Richthofer <stefan.richthofer at gmx.de>
date:        Sat Sep 05 02:56:13 2015 +0200
summary:
  fixed some issue in Py-constructor support-code from two commits before. (occurred to me during some review)

files:
  src/org/python/core/Py.java |  6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/src/org/python/core/Py.java b/src/org/python/core/Py.java
--- a/src/org/python/core/Py.java
+++ b/src/org/python/core/Py.java
@@ -2475,11 +2475,13 @@
             if (!cls.isInterface()) throw
                 new IllegalArgumentException("cls must be an interface.");
             interfaces.add(0, cls);
+            pyClasses.add(0, pyCls);
             for (int i = interfaces.size()-1; i > 0; --i) {
-                if (interfaces.get(i).isAssignableFrom(cls))
+                if (interfaces.get(i).isAssignableFrom(cls)) {
                     interfaces.remove(i);
+                    pyClasses.remove(i);
+                }
             }
-            pyClasses.add(pyCls);
         }
     }
 

-- 
Repository URL: https://hg.python.org/jython


More information about the Jython-checkins mailing list