diff -r 8fbbc7c8748e Python/marshal.c --- a/Python/marshal.c Sat Jul 28 12:25:55 2012 +0200 +++ b/Python/marshal.c Sat Jul 28 12:45:25 2012 +0200 @@ -121,15 +121,6 @@ w_byte((char)((x>>24) & 0xff), p); } -#if SIZEOF_LONG > 4 -static void -w_long64(long x, WFILE *p) -{ - w_long(x, p); - w_long(x>>32, p); -} -#endif - /* We assume that Python longs are stored internally in base some power of 2**15; for the sake of portability we'll always read and write them in base exactly 2**15. */ @@ -219,8 +210,8 @@ #if SIZEOF_LONG > 4 long y = Py_ARITHMETIC_RIGHT_SHIFT(long, x, 31); if (y && y != -1) { - w_byte(TYPE_INT64, p); - w_long64(x, p); + /* Too large for TYPE_INT */ + w_PyLong((PyLongObject*)v, p); } else #endif