From 2ffb26fb83b4c559d1f4cd3a26cda6d7234e809d Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sun, 15 Feb 2009 10:13:41 +0000 Subject: Issue #5260: Various portability and standards compliance fixes, optimizations and cleanups in Objects/longobject.c. The most significant change is that longs now use less memory: average savings are 2 bytes per long on 32-bit systems and 6 bytes per long on 64-bit systems. (This memory saving already exists in py3k.) --- Include/longintrepr.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Include') diff --git a/Include/longintrepr.h b/Include/longintrepr.h index df157a8f98..c32d72c86e 100644 --- a/Include/longintrepr.h +++ b/Include/longintrepr.h @@ -19,14 +19,13 @@ extern "C" { long_pow() requires that SHIFT be divisible by 5. */ typedef unsigned short digit; -typedef unsigned int wdigit; /* digit widened to parameter size */ #define BASE_TWODIGITS_TYPE long typedef unsigned BASE_TWODIGITS_TYPE twodigits; typedef BASE_TWODIGITS_TYPE stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 15 #define PyLong_BASE ((digit)1 << PyLong_SHIFT) -#define PyLong_MASK ((int)(PyLong_BASE - 1)) +#define PyLong_MASK ((digit)(PyLong_BASE - 1)) /* b/w compatibility with Python 2.5 */ #define SHIFT PyLong_SHIFT -- cgit v1.2.1