Message2762
Committed in r3366.
I'm guessing you switched from an array of PyObject in your patch to a Vector to accumulate the objects for the range because an array in java can only be up to Integer.MAX_VALUE in length. Switching to a Vector doesn't actually get around that problem; a Vector uses an array for its internal storage, so it'll hit it too. Since we use arrays internally in PyList as well, I just added a check to prevent a user from creating a range with more than Integer.MAX_VALUE items in it. If someone actually has enough ram to do something like that, we can worry about it then.
Just as a general Java usage tip, there's no reason to use Vector instead of List in code that can use Java 1.2. Vector is synchronized by default, but you can get that behavior on a List with Collections.synchronizedList. Vector is used in Jython currently, but that's only because that code was written long, long ago. |
|
Date |
User |
Action |
Args |
2008-02-20 17:18:44 | admin | link | issue1761858 messages |
2008-02-20 17:18:44 | admin | create | |
|