[Jython-checkins] jython (merge 2.5 -> default): Merge with 2.5.

frank.wierzbicki jython-checkins at python.org
Wed Jul 18 17:21:19 CEST 2012


http://hg.python.org/jython/rev/eff0277ba0d9
changeset:   6800:eff0277ba0d9
parent:      6794:940d38d23c83
parent:      6799:aa13e5d9a23f
user:        Frank Wierzbicki <fwierzbicki at gmail.com>
date:        Tue Jul 17 10:51:32 2012 -0700
summary:
  Merge with 2.5.

files:
  src/org/python/core/PyClass.java    |  4 ++--
  src/org/python/core/PyFunction.java |  2 +-
  src/org/python/core/imp.java        |  2 +-
  3 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/src/org/python/core/PyClass.java b/src/org/python/core/PyClass.java
--- a/src/org/python/core/PyClass.java
+++ b/src/org/python/core/PyClass.java
@@ -42,7 +42,7 @@
     }
 
     public static PyObject classobj___new__(PyObject name, PyObject bases, PyObject dict) {
-        if (!name.getType().isSubType(PyString.TYPE)) {
+        if (!name.getType().isSubType(PyBaseString.TYPE)) {
             throw Py.TypeError("PyClass_New: name must be a string");
         }
         if (!(dict instanceof PyStringMap || dict instanceof PyDictionary)) {
@@ -273,7 +273,7 @@
     }
 
     public void setName(PyObject value) {
-        if (value == null || !Py.isInstance(value, PyString.TYPE)) {
+        if (value == null || !Py.isInstance(value, PyBaseString.TYPE)) {
             throw Py.TypeError("__name__ must be a string object");
         }
         String name = value.toString();
diff --git a/src/org/python/core/PyFunction.java b/src/org/python/core/PyFunction.java
--- a/src/org/python/core/PyFunction.java
+++ b/src/org/python/core/PyFunction.java
@@ -104,7 +104,7 @@
             throw Py.TypeError("function() argument 1 must be code, not " +
                                code.getType().fastGetName());
         }
-        if (name != Py.None && !Py.isInstance(name, PyString.TYPE)) {
+        if (name != Py.None && !Py.isInstance(name, PyBaseString.TYPE)) {
             throw Py.TypeError("arg 3 (name) must be None or string");
         }
         if (defaults != Py.None && !(defaults instanceof PyTuple)) {
diff --git a/src/org/python/core/imp.java b/src/org/python/core/imp.java
--- a/src/org/python/core/imp.java
+++ b/src/org/python/core/imp.java
@@ -888,7 +888,7 @@
 
             StringBuilder modNameBuffer = new StringBuilder(name);
             for (PyObject item : fromlist.asIterable()) {
-                if (!Py.isInstance(item, PyString.TYPE)) {
+                if (!Py.isInstance(item, PyBaseString.TYPE)) {
                     throw Py.TypeError("Item in ``from list'' not a string");
                 }
                 if (item.toString().equals("*")) {

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


More information about the Jython-checkins mailing list