]> granicus.if.org Git - python/commitdiff
dump(): Fixed a stupid bug in new code. It wasn't possible for the bug
authorTim Peters <tim.peters@gmail.com>
Sun, 2 Feb 2003 16:14:23 +0000 (16:14 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 2 Feb 2003 16:14:23 +0000 (16:14 +0000)
to have an effect before protocol 3 is invented, so no test can be
written for this (yet).

Modules/cPickle.c

index 43a8d331029a0bcf1d1d1461bb676374f58d6a37..17ccb45893854473ffee1acbc2a11b35192f0daf 100644 (file)
@@ -2217,7 +2217,7 @@ dump(Picklerobject *self, PyObject *args)
                char bytes[2];
 
                bytes[0] = PROTO;
-               bytes[1] = CURRENT_PROTOCOL_NUMBER;
+               bytes[1] = self->proto;
                if (self->write_func(self, bytes, 2) < 0)
                        return -1;
        }