changeset 8311:159c277c4a80

Restored the PyShadowString-PyObject-String constructor as deprecated API. Removal of this constructor broke compatibility with JyNI 2.7-alpha5.
author Stefan Richthofer <stefan.richthofer@gmx.de>
date Mon, 04 Nov 2019 19:59:21 +0100
parents e19a4c1ade2e
children 84ad2ab25bca
files src/org/python/core/PyShadowString.java
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/python/core/PyShadowString.java
+++ b/src/org/python/core/PyShadowString.java
@@ -59,6 +59,19 @@ public class PyShadowString extends PySt
         this(TYPE, Py.newString(primary), Py.newString(shadow), new PyList());
     }
 
+    /**
+     * Construct an instance specifying primary and shadow values
+     * (bytes object expected for primary).
+     * This somewhat uncanonical constructor was removed in Jython 2.7.2.
+     * The deprecated version is kept for compatibility with JyNI 2.7-alpha5.
+     *
+     * @deprecated use the constructor with strings instead.
+     */
+    @Deprecated
+    public PyShadowString(PyObject primary, String shadow) {
+        this(TYPE, primary, Py.newString(shadow), new PyList());
+    }
+
     /** Construct an instance specifying primary and shadow values (bytes objects expected). */
     private PyShadowString(PyObject primary, PyObject shadow) {
         this(TYPE, primary, shadow, new PyList());