[Python-checkins] cpython: Remove code path in cpickle that does not exist in pickle.

alexandre.vassalotti python-checkins at python.org
Sun Nov 24 12:07:39 CET 2013


http://hg.python.org/cpython/rev/6bd1f0a27e8e
changeset:   87496:6bd1f0a27e8e
user:        Alexandre Vassalotti <alexandre at peadrop.com>
date:        Sun Nov 24 03:07:35 2013 -0800
summary:
  Remove code path in cpickle that does not exist in pickle.

files:
  Modules/_pickle.c |  8 +-------
  1 files changed, 1 insertions(+), 7 deletions(-)


diff --git a/Modules/_pickle.c b/Modules/_pickle.c
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -3584,13 +3584,7 @@
     }
     else if (type == &PyFunction_Type) {
         status = save_global(self, obj, NULL);
-        if (status < 0 && PyErr_ExceptionMatches(PickleError)) {
-            /* fall back to reduce */
-            PyErr_Clear();
-        }
-        else {
-            goto done;
-        }
+        goto done;
     }
 
     /* XXX: This part needs some unit tests. */

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list