[Python-checkins] r56196 - python/branches/cpy_merge/Modules/_picklemodule.c

alexandre.vassalotti python-checkins at python.org
Sun Jul 8 21:53:06 CEST 2007


Author: alexandre.vassalotti
Date: Sun Jul  8 21:53:06 2007
New Revision: 56196

Modified:
   python/branches/cpy_merge/Modules/_picklemodule.c
Log:
Remove write_none.

pickle.py doesn't allow to use None as the output file, anyway.


Modified: python/branches/cpy_merge/Modules/_picklemodule.c
==============================================================================
--- python/branches/cpy_merge/Modules/_picklemodule.c	(original)
+++ python/branches/cpy_merge/Modules/_picklemodule.c	Sun Jul  8 21:53:06 2007
@@ -462,16 +462,6 @@
 }
 
 static int
-write_none(Picklerobject *self, const char *s, Py_ssize_t n)
-{
-    if (s == NULL)
-        return 0;
-    if (n > INT_MAX)
-        return -1;
-    return (int) n;
-}
-
-static int
 write_other(Picklerobject *self, const char *s, Py_ssize_t _n)
 {
     PyObject *py_str = 0, *junk = 0;
@@ -2651,9 +2641,6 @@
         }
         self->write_func = write_file;
     }
-    else if (file == Py_None) {
-        self->write_func = write_none;
-    }
     else {
         self->write_func = write_other;
 


More information about the Python-checkins mailing list