1. 11 Mar, 2002 1 commit
  2. 08 Mar, 2002 3 commits
    • Jeremy Hylton's avatar
      (Possibly) correct use of Python memory APIs. · 469b47a0
      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.
      469b47a0
    • 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
    • Jeremy Hylton's avatar
      Add a sane __str__() to transaction objects. · 0afd8bdf
      Jeremy Hylton authored
         The previous, insane version was passing None or a thread id to "%.03f".
      
      Add some whitespace around get_transaction() implementations.
      0afd8bdf
  3. 28 Feb, 2002 2 commits
  4. 21 Feb, 2002 1 commit
  5. 20 Feb, 2002 1 commit
  6. 13 Feb, 2002 1 commit
  7. 12 Feb, 2002 3 commits
  8. 11 Feb, 2002 6 commits
  9. 07 Feb, 2002 1 commit
  10. 30 Jan, 2002 12 commits
  11. 28 Jan, 2002 1 commit
  12. 27 Jan, 2002 1 commit
  13. 26 Jan, 2002 1 commit
  14. 25 Jan, 2002 6 commits
    • Tim Peters's avatar
      checkExtendedIteration(): On Windows revids are often consecutive · eaa9c142
      Tim Peters authored
      integers, due to MS's slothful 18.2Hz updating of time.time().  The test
      implicitly assumed in one spot that "the midpoint" between two revids was
      strictly larger than the smaller one, but that wasn't true on Windows.
      Adjusted the computation (as suggested by Guido) so that "strictly larger"
      holds in the end even when the inputs are adjacent integers.
      eaa9c142
    • Jeremy Hylton's avatar
      07b977dd
    • Guido van Rossum's avatar
      Fix a problem I saw when some tests here failed: there's a pattern in · ec6c4a89
      Guido van Rossum authored
      the code
      
          try:
              root = self._getRoot()
              ...
          except:
              self._closeDB(root)
      	self._delDB()
      	raise
      
      which fails with an UnboundLocalError if the first line in the try
      clause fails.  Fixed this by setting 'root = None' before each such
      try clause, and adding a None check to _closeDB().  Also removed a
      useless 'root = None' from the body of _closeDB().
      
      Barry: I saw this in the saz 1.0c1 release.  Is it worth backporting?
      Probably not given that we're not going to do a merge pre-1.0.
      ec6c4a89
    • Jeremy Hylton's avatar
      Guarantee that _dostore() does not leave a transaction in progress. · a858080a
      Jeremy Hylton authored
      Put the tpc_begin() -> tpc_finish() in a try/except.  If an error
      occurs, abort the current transaction and re-raise the error.
      
      It appears that some storages (well, only Standby Storage) has trouble
      shutting down if a transaction is in progress.
      a858080a
    • Jeremy Hylton's avatar
    • Jeremy Hylton's avatar
      Code cleanup. · a8b6c61d
      Jeremy Hylton authored
      Replace three small integers with symbolic constants.
          TRANS_HDR_LEN = 23
          DATA_HDR_LEN = 42
          DATA_VERSION_HDR_LEN = 58
      The constants make it easier to remember what kind of header is being
      read and/or what kind of offset is being computed.
      
      Refactor commitVersion():
          - Keep locking & arg checking in commitVersion(), but move actual
            commit logic to _commitVersion().  This removes a level of
            indentation.
      
          - Remove local vars that alias attributes of other vars
      
      Add a few more POSKeyError exceptions.
      a8b6c61d