Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 146868
Collapse All | Expand All

(-)jython-2.1/com/ziclix/python/sql/pipe/Pipe.java.orig (-1 / +1 lines)
Lines 93-99 Link Here
93
													 new Integer(sinkRunner.getCount()) };
93
													 new Integer(sinkRunner.getCount()) };
94
			String msg = zxJDBC.getString("inconsistentRowCount", counts);
94
			String msg = zxJDBC.getString("inconsistentRowCount", counts);
95
95
96
			Py.assert(Py.Zero, Py.newString(msg));
96
			Py.assert_(Py.Zero, Py.newString(msg));
97
		}
97
		}
98
98
99
		return Py.newInteger(sinkRunner.getCount());
99
		return Py.newInteger(sinkRunner.getCount());
(-)jython-2.1/org/python/compiler/CodeCompiler.java.orig (-2 / +2 lines)
Lines 817-830 Link Here
817
            node.getChild(1).visit(this);
817
            node.getChild(1).visit(this);
818
            if (mrefs.assert2 == 0) {
818
            if (mrefs.assert2 == 0) {
819
                mrefs.assert2 = code.pool.Methodref(
819
                mrefs.assert2 = code.pool.Methodref(
820
                    "org/python/core/Py", "assert",
820
                    "org/python/core/Py", "assert_",
821
                    "(" + $pyObj + $pyObj + ")V");
821
                    "(" + $pyObj + $pyObj + ")V");
822
            }
822
            }
823
            code.invokestatic(mrefs.assert2);
823
            code.invokestatic(mrefs.assert2);
824
        } else {
824
        } else {
825
            if (mrefs.assert1 == 0) {
825
            if (mrefs.assert1 == 0) {
826
                mrefs.assert1 = code.pool.Methodref(
826
                mrefs.assert1 = code.pool.Methodref(
827
                    "org/python/core/Py", "assert",
827
                    "org/python/core/Py", "assert_",
828
                    "(" + $pyObj + ")V");
828
                    "(" + $pyObj + ")V");
829
            }
829
            }
830
            code.invokestatic(mrefs.assert1);
830
            code.invokestatic(mrefs.assert1);
(-)jython-2.1/org/python/core/Py.java.orig (-3 / +3 lines)
Lines 986-999 Link Here
986
986
987
987
988
    /* Equivalent to Python's assert statement */
988
    /* Equivalent to Python's assert statement */
989
    public static void assert(PyObject test, PyObject message) {
989
    public static void assert_(PyObject test, PyObject message) {
990
        if (!test.__nonzero__()) {
990
        if (!test.__nonzero__()) {
991
            throw new PyException(Py.AssertionError, message);
991
            throw new PyException(Py.AssertionError, message);
992
        }
992
        }
993
    }
993
    }
994
994
995
    public static void assert(PyObject test) {
995
    public static void assert_(PyObject test) {
996
        assert(test, Py.None);
996
        assert_(test, Py.None);
997
    }
997
    }
998
998
999
    /* Helpers to implement finally clauses */
999
    /* Helpers to implement finally clauses */
(-)jython-2.1/Tools/jythonc/SimpleCompiler.py.orig (-1 / +1 lines)
Lines 577-583 Link Here
577
            args.append(message.asAny())
577
            args.append(message.asAny())
578
578
579
        return jast.If(self.frame.getglobal("__debug__").nonzero(),
579
        return jast.If(self.frame.getglobal("__debug__").nonzero(),
580
                       jast.InvokeStatic("Py", "assert", args))
580
                       jast.InvokeStatic("Py", "assert_", args))
581
581
582
    def return_stmt(self, value=None):
582
    def return_stmt(self, value=None):
583
        if value is None:
583
        if value is None:

Return to bug 146868