diff options
author | cvs2svn <tools@python.org> | 2001-12-28 04:27:46 (GMT) |
---|---|---|
committer | cvs2svn <tools@python.org> | 2001-12-28 04:27:46 (GMT) |
commit | 22768184cbbaa4bd6083c51c28183be7f4fc3d69 (patch) | |
tree | 38c0e4c1fcb64ef631a5737ca9bf469263e98be9 /Modules | |
parent | bec5b362db9848e291219539a466b9e2c5fcbe25 (diff) | |
download | cpython-22768184cbbaa4bd6083c51c28183be7f4fc3d69.zip cpython-22768184cbbaa4bd6083c51c28183be7f4fc3d69.tar.gz cpython-22768184cbbaa4bd6083c51c28183be7f4fc3d69.tar.bz2 |
This commit was manufactured by cvs2svn to create branch
'release22-maint'.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/cPickle.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c index a4943ce..adf7e44 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -321,7 +321,9 @@ typedef struct Picklerobject { PyObject *fast_memo; } Picklerobject; -#define FAST_LIMIT 2000 +#ifndef PY_CPICKLE_FAST_LIMIT +#define PY_CPICKLE_FAST_LIMIT 50 +#endif staticforward PyTypeObject Picklertype; @@ -891,7 +893,7 @@ static int fast_save_enter(Picklerobject *self, PyObject *obj) { /* if fast_container < 0, we're doing an error exit. */ - if (++self->fast_container >= FAST_LIMIT) { + if (++self->fast_container >= PY_CPICKLE_FAST_LIMIT) { PyObject *key = NULL; if (self->fast_memo == NULL) { self->fast_memo = PyDict_New(); @@ -921,7 +923,7 @@ fast_save_enter(Picklerobject *self, PyObject *obj) int fast_save_leave(Picklerobject *self, PyObject *obj) { - if (self->fast_container-- >= FAST_LIMIT) { + if (self->fast_container-- >= PY_CPICKLE_FAST_LIMIT) { PyObject *key = PyLong_FromVoidPtr(obj); if (key == NULL) return 0; |