summaryrefslogtreecommitdiff
path: root/Modules/_struct.c
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2006-10-07 14:56:30 +0000
committerKristján Valur Jónsson <kristjan@ccpgames.com>2006-10-07 14:56:30 +0000
commit282de80846939bab3c3e0ce4d2f6861e15962eae (patch)
tree5dc6de315224b2d2d8baa1885aa3dcb4d0098579 /Modules/_struct.c
parenta6833d62b8293cb1eb06af0bdaaf46a058249133 (diff)
downloadcpython-282de80846939bab3c3e0ce4d2f6861e15962eae.tar.gz
Backport the .sln and .vcproj files for PCBuild8 from the python trunk to the 2.5 maintainance branch. This fixes build problems with visual studio 2005, and cleans up profile guided optimization.
Diffstat (limited to 'Modules/_struct.c')
-rw-r--r--Modules/_struct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 22d0e030cf..fb509872a7 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -820,7 +820,7 @@ bu_longlong(const char *p, const formatdef *f)
} while (--i > 0);
/* Extend the sign bit. */
if (SIZEOF_LONG_LONG > f->size)
- x |= -(x & (1L << ((8 * f->size) - 1)));
+ x |= -(x & ( (PY_LONG_LONG)1 << ((8 * f->size) - 1)));
if (x >= LONG_MIN && x <= LONG_MAX)
return PyInt_FromLong(Py_SAFE_DOWNCAST(x, PY_LONG_LONG, long));
return PyLong_FromLongLong(x);
@@ -1038,7 +1038,7 @@ lu_longlong(const char *p, const formatdef *f)
} while (i > 0);
/* Extend the sign bit. */
if (SIZEOF_LONG_LONG > f->size)
- x |= -(x & (1L << ((8 * f->size) - 1)));
+ x |= -(x & ( (PY_LONG_LONG)1 << ((8 * f->size) - 1)));
if (x >= LONG_MIN && x <= LONG_MAX)
return PyInt_FromLong(Py_SAFE_DOWNCAST(x, PY_LONG_LONG, long));
return PyLong_FromLongLong(x);