[Checkins] [zopefoundation/persistent] 516f90: Change cPickleCache to use PER_TypeCheck
GitHub
noreply at github.com
Mon Jul 30 19:10:34 CEST 2018
Branch: refs/heads/master
Home: https://github.com/zopefoundation/persistent
Commit: 516f90ecac0def9655fbf3be5a8c7acb2dc05cbc
https://github.com/zopefoundation/persistent/commit/516f90ecac0def9655fbf3be5a8c7acb2dc05cbc
Author: Jason Madden <jamadden at gmail.com>
Date: 2018-07-30 (Mon, 30 Jul 2018)
Changed paths:
M CHANGES.rst
M persistent/cPickleCache.c
Log Message:
-----------
Change cPickleCache to use PER_TypeCheck
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.
Commit: 4284df3394af3a25d7887cae554e7a5fc0fb184d
https://github.com/zopefoundation/persistent/commit/4284df3394af3a25d7887cae554e7a5fc0fb184d
Author: Jason Madden <jason+github at nextthought.com>
Date: 2018-07-30 (Mon, 30 Jul 2018)
Changed paths:
M CHANGES.rst
M persistent/cPickleCache.c
Log Message:
-----------
Merge pull request #70 from zopefoundation/issue69
Change cPickleCache to use PER_TypeCheck
Compare: https://github.com/zopefoundation/persistent/compare/d1966b534e92...4284df3394af
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the checkins
mailing list