Issue1598944

classification
Title: Small stab at long/int unification
Type: Severity: normal
Components: None Versions:
Milestone:
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: akuchling, cgroves, leouserz
Priority: normal Keywords: patch

Created on 2006-11-18.18:49:28 by akuchling, last changed 2007-04-18.04:58:11 by cgroves.

Files
File name Uploaded Description Edit Remove
longint.patch akuchling, 2006-11-18.18:49:28 Patch to fix lshift, rshift, read
Messages
msg2540 (view) Author: A.M. Kuchling (akuchling) Date: 2006-11-18.18:49:28
I tried running test_zipfile with the 2.3 branch; it failed because you couldn't do '2 << 3L' and you couldn't pass a long integer to the read() method.  These type combinations work in Python 2.3.

The attached patch makes them work.     I suspect many more changes are needed for PyInteger.java to make other operations work with long.

Note that the indentation in the patch is wrong -- I need to configure Emacs properly.  For now I'd just like to know if the approach taken in the patch is correct.
msg2541 (view) Author: Charlie Groves (cgroves) Date: 2006-11-22.03:14:48
That's the approach I'd take.  The only thing I'd do differently is to call __long__() instead of 'new PyLong(getValue())'.  DRY and all that.
msg2542 (view) Author: Deleted User leouserz (leouserz) Date: 2007-01-15.19:24:13
Apparently Ive created a very similiar patch but for a different bug.  The problems are the same though:
int bitwise op long
bombs!

https://sourceforge.net/tracker/index.php?func=detail&aid=1636030&group_id=12867&atid=312867
msg2543 (view) Author: Charlie Groves (cgroves) Date: 2007-04-18.04:58:11
Leo's patch contained this and more and was committed in r3166.
History
Date User Action Args
2006-11-18 18:49:28akuchlingcreate