1. 30 Jul, 2018 2 commits
    • Jason Madden's avatar
      Merge pull request #70 from zopefoundation/issue69 · 4284df33
      Jason Madden authored
      Change cPickleCache to use PER_TypeCheck
      4284df33
    • Jason Madden's avatar
      Change cPickleCache to use PER_TypeCheck · 516f90ec
      Jason Madden authored
      Instead of testing object sizes.
      
      This matches what the pure Python implementation does and is a
      stronger test that the object really is compatible with the cache.
      Previously, an object could potentially include ``cPersistent_HEAD``
      and *not* set ``tp_base`` to ``cPersistenceCAPI->pertype`` and still
      be eligible for the pickle cache; that is no longer the case.
      
      This resolves several compiler warnings:
      
      persistent/cPickleCache.c:521:43: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
                      (v->ob_type->tp_basicsize >= sizeof(cPersistentObject))
                       ~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
      persistent/cPickleCache.c:709:39: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
          else if (v->ob_type->tp_basicsize < sizeof(cPersistentObject))
      
      Fixes #69.
      516f90ec
  2. 21 Feb, 2018 1 commit
  3. 10 Oct, 2017 2 commits
  4. 05 Oct, 2017 1 commit
  5. 15 Sep, 2017 2 commits
  6. 23 Apr, 2017 5 commits
  7. 22 Apr, 2017 1 commit
  8. 21 Apr, 2017 5 commits
  9. 20 Mar, 2017 4 commits
    • Tres Seaver's avatar
      svb · f51c2576
      Tres Seaver authored
      f51c2576
    • Tres Seaver's avatar
      Prep 4.2.4 release. · 4667d151
      Tres Seaver authored
      4667d151
    • Tres Seaver's avatar
      Merge pull request #62 from zopefoundation/jam-systemerror · afeb85bc
      Tres Seaver authored
      Avoid raising a SystemError when clearing slots if setstate() failed.
      afeb85bc
    • Jason Madden's avatar
      Avoid raising a SystemError when clearing slots if setstate() failed. · e8b9c8e9
      Jason Madden authored
      PR #52 introduced a code path to `ghostify` that calls PyErr_Clear()
      with the intent to avoid propagating AttributeErrors for slots.
      
      However, if there is an error (like a POSKeyError) raised by
      jar.setstate(), then `unghostify` will call ghostify with an error
      pending. If the object had slots that weren't set and the
      AttributeError was cleared, so was the pending error from setstate. So
      when `ghostify` returned NULL that got propagated up to the
      interpreter which finds no exception and so raises `SystemError: error
      return without exception set`.
      
      This commit makes `unghostify` save and restore the exception state
      around the call to PyErr_Clear.
      e8b9c8e9
  10. 08 Mar, 2017 3 commits
  11. 27 Feb, 2017 1 commit
  12. 26 Feb, 2017 1 commit
  13. 23 Feb, 2017 2 commits
  14. 22 Feb, 2017 2 commits
  15. 16 Jan, 2017 1 commit
  16. 14 Jan, 2017 2 commits
  17. 13 Jan, 2017 5 commits