From: Finn B. <bc...@us...> - 2002-03-11 13:58:46
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv29123 Modified Files: PyLong.java Log Message: Fix for "[ 517237 ] Binary ops with int and long fail". Index: PyLong.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyLong.java,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -d -r2.14 -r2.15 *** PyLong.java 13 Jan 2002 18:20:31 -0000 2.14 --- PyLong.java 11 Mar 2002 13:58:42 -0000 2.15 *************** *** 355,358 **** --- 355,364 ---- } + public PyObject __rand__(PyObject left) { + if (!canCoerce(left)) + return null; + return new PyLong(coerce(left).and(value)); + } + public PyObject __xor__(PyObject right) { if (!canCoerce(right)) *************** *** 361,368 **** --- 367,386 ---- } + public PyObject __rxor__(PyObject left) { + if (!canCoerce(left)) + return null; + return new PyLong(coerce(left).xor(value)); + } + public PyObject __or__(PyObject right) { if (!canCoerce(right)) return null; return new PyLong(value.or(coerce(right))); + } + + public PyObject __ror__(PyObject left) { + if (!canCoerce(left)) + return null; + return new PyLong(coerce(left).or(value)); } |