An error occurred fetching the project authors.
  1. 21 Jun, 2010 1 commit
  2. 11 Nov, 2007 1 commit
  3. 02 Jun, 2004 1 commit
  4. 31 May, 2004 1 commit
    • Casey Duncan's avatar
      Fix bug indexing BTreeItems with negative values. Previous code assumed that... · b4ae0a53
      Casey Duncan authored
      Fix bug indexing BTreeItems with negative values. Previous code assumed that idexes passed to BTreeItem_item would be negative, in practice this was not the case, and an index of -1 actually passed len(items)-1 as the index argument. Consequently, it was possible to access each item using two negative indexes (i.e., -1 and -len(items)-1). This made each item appear twice in a reverse iteration.
      
      Code in BTreeItems_seek attempted to match the sign of the pseudoindex kept in the BTreeItems obj and the incoming index. Since this incoming index was never legitimately negative as it assumed, actually negatives passed in due to "overshooting" the first item would repeat the items again from the end. Removal of this code corrects the problem.
      
      Unittests which provoke the error in the original code have also been added.
      
      b4ae0a53
  5. 14 May, 2004 1 commit
  6. 28 Nov, 2003 1 commit
  7. 16 Mar, 2003 1 commit
  8. 31 Jan, 2003 1 commit
  9. 22 Jun, 2002 1 commit
  10. 18 Jun, 2002 2 commits
  11. 17 Jun, 2002 1 commit
    • Tim Peters's avatar
      firstBucketOffset(), lastBucketOffset(): removed these functions. Their · 49592586
      Tim Peters authored
      purpose wasn't clear, and the few places that bothered to call them seemed
      to be trying to cater to empty buckets.  But empty buckets aren't legitimate
      in a BTree (or, if they are, lots of BTree code is broken).
      
      BTreeItems struct:  finished figuring out what's in this, and documented it.
      
      BTreeItems_seek():  rewrote and simplified, to avoid use of the now-
      removed XYZBucketOffset() functions.  Repaired places where bucket access
      time wasn't getting updated.  There are still insecurities in its use of
      PreviousBucket() (for another day).
      
      BTreeItems_slice():  now that I know what it is <wink>, create an empty
      slice in the intended way.
      
      NewBTreeItems():  documented its calling sequence, and added code to
      protect against a NULL highbucket argument.
      
      BTree_maxminKey():  no longer calls the XYZBucketOffset() functions.
      49592586
  12. 10 Jun, 2002 1 commit
  13. 09 Jun, 2002 3 commits
    • Tim Peters's avatar
      nextBTreeItems() and nextTreeSetItems(): unlike the other set iteration · ec683139
      Tim Peters authored
      "next" functions, these can return a PER_USE() error *after* decrefing
      the keys and values left over from the last call.  But they don't mark
      the iteration as terminated, so finiSetIteration() will also try to
      decref the leftovers.  The fix is to mark the iteration as terminated
      when these functions fail.
      ec683139
    • Tim Peters's avatar
      Fix for http://collector.zope.org/Zope/419, · f6a898f9
      Tim Peters authored
      "BTreeItems slice contains 1 too many elements"
      This also fixes many related glitches, such as that giving an
      out-of-bound slice index raised IndexError instead of clipping.
      
      BTreeItems_slice():  Emulate Python slicing semantics in all cases.
      
      testBTrees.py:  new testSlicing() tests in MappingBase and NormalSetTests
      to ensure that slicing of .keys()/.items()/.values() works exactly the
      same way as slicing of Python lists, in all one-sided, two-sided and
      whole-structure ([:]) cases, with both negative and positive slice indices,
      and mixtures of + and -, and whether in bounds or out of bounds.
      f6a898f9
    • Tim Peters's avatar
      Trimmed trailing whitespace. · 585f31ad
      Tim Peters authored
      585f31ad
  14. 08 Mar, 2002 1 commit
    • Jeremy Hylton's avatar
      (Possibly) correct use of Python memory APIs. · ff24f9df
      Jeremy Hylton authored
      Fix SF bug #516768 reported by Dave Wallace.
      
      Replace use of PyMem_DEL() with PyObject_Del() on object dealloc
      functions.  The use of PyMem_DEL() is incorrect for object
      deallocation, because it only ever calls the low-level free().  If a
      custom allocator like pymalloc is used, it needs to be called to free
      the memory.
      
      Also replace bare malloc() and realloc() with PyMem_Malloc() and
      PyMem_Realloc().  I think this isn't a strict bug fix, but a would be
      nice.  It guarantees that BTrees objects get their memory from the
      same allocator as the Python core.
      ff24f9df
  15. 11 Feb, 2002 1 commit
  16. 28 Nov, 2001 1 commit
  17. 20 Mar, 2001 1 commit
  18. 15 Mar, 2001 2 commits
  19. 19 Feb, 2001 1 commit
  20. 16 Feb, 2001 1 commit
  21. 05 Feb, 2001 1 commit
    • Jim Fulton's avatar
      · a0dadf7c
      Jim Fulton authored
      Added Sets as distinct types within template. This will make
      merging sets and mapping objects (e.g. integer sets and
      integer to integer mappings) easier later.
      
      Split template into multiple files.
      
      Change buckets to use separate key and value arrays.
      This makes set handling (null value arrays) a little simpler
      and will allow us to save memory if we implement types with
      small keys or values (e.g. short keys).
      a0dadf7c