]> granicus.if.org Git - python/commitdiff
Factor common branch in load_long().
authorAlexandre Vassalotti <alexandre@peadrop.com>
Sat, 24 Jan 2009 01:47:57 +0000 (01:47 +0000)
committerAlexandre Vassalotti <alexandre@peadrop.com>
Sat, 24 Jan 2009 01:47:57 +0000 (01:47 +0000)
Suggested by Neal Norwitz.

Modules/_pickle.c

index 435969d6762e92bb777f9b17bd8dd1868221cf23..6536e6f16041c56cc912ef4264f38d6a65cc69d2 100644 (file)
@@ -2895,12 +2895,9 @@ load_long(UnpicklerObject *self)
        the 'L' to be present. */
     if (s[len-2] == 'L') {
         s[len-2] = '\0';
-        /* XXX: Should the base argument explicitly set to 10? */
-        value = PyLong_FromString(s, NULL, 0);
-    }
-    else {
-        value = PyLong_FromString(s, NULL, 0);
     }
+    /* XXX: Should the base argument explicitly set to 10? */
+    value = PyLong_FromString(s, NULL, 0);
     if (value == NULL)
         return -1;