Factor common branch in load_long().

Suggested by Neal Norwitz.
This commit is contained in:
Alexandre Vassalotti 2009-01-24 01:47:57 +00:00
parent 6fd47e2ce1
commit e4bccb7146
1 changed files with 2 additions and 5 deletions

View 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;