Commit 5c9c0885 authored by Jim Fulton's avatar Jim Fulton

fixes

parent 3a91222d
/*
$Id: cPickle.c,v 1.30 1997/03/04 20:17:53 chris Exp $
$Id: cPickle.c,v 1.31 1997/03/04 21:07:59 jim Exp $
Copyright
......@@ -912,7 +912,8 @@ save_tuple(Picklerobject *self, PyObject *args) {
UNLESS(py_tuple_id = PyInt_FromLong((long)args))
goto finally;
if ((has_key = len && PyMapping_HasKey(self->memo, py_tuple_id)) < 0)
/* if ((has_key = len && PyMapping_HasKey(self->memo, py_tuple_id)) < 0) */
if ((has_key = PyMapping_HasKey(self->memo, py_tuple_id)) < 0)
goto finally;
if (has_key) {
......@@ -3713,7 +3714,7 @@ init_stuff(PyObject *module, PyObject *module_dict) {
void
initcPickle() {
PyObject *m, *d;
char *rev="$Revision: 1.30 $";
char *rev="$Revision: 1.31 $";
PyObject *format_version;
PyObject *compatible_formats;
......
# $Id: pickle.py,v 1.10 1997/03/04 19:45:03 jim Exp $
# $Id: pickle.py,v 1.11 1997/03/04 21:08:00 jim Exp $
#
# Copyright
#
......@@ -291,6 +291,7 @@ class Pickler:
if (self.bin):
self.save_empty_tuple(object)
else:
print 'here'
self.save_tuple(object)
return
......@@ -430,15 +431,17 @@ class Pickler:
write(MARK)
print '+1'
for element in object:
save(element)
print '+2'
if (memo.has_key(d)):
write(POP * len(object) + self.get(memo[d][0]))
return
print '+3'
memo_len = len(memo)
self.write(TUPLE + self.put(memo_len))
print '+4'
memo[d] = (memo_len, object)
dispatch[TupleType] = save_tuple
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment