From: Andreas L. <av...@lo...> - 2008-02-01 08:50:35
|
On Fri, Feb 01, 2008 at 08:54:04AM +0100, Alexandre Ferrieux wrote: > The idea is to lazily convert to list twice: once to get the length, > and once again after decoding the indices to get the element array > ready. A layman's EUR 0.02: from what I've read so far in this thread, I wonder, why it doesn't happen that way to deal with those possible [lrange $x $x $x] cases: if (list-object is identical with any index-object) { create a deep copy of list-param first, and store it in tmpList. } else { assign the list-param to tmpList } retrieve indices from objv and modify tmpList (with COW) |