summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-02-14 14:09:25 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-02-14 14:09:25 (GMT)
commit57a432d95e19837a62c27a0a9faf72cb3166e760 (patch)
tree184cbdef188e5ca9d2f8fe0467ce57424c3766c0 /Include
parent5a41a4c235ed09e08d7325e64c9ee2b485f54670 (diff)
downloadcpython-57a432d95e19837a62c27a0a9faf72cb3166e760.zip
cpython-57a432d95e19837a62c27a0a9faf72cb3166e760.tar.gz
cpython-57a432d95e19837a62c27a0a9faf72cb3166e760.tar.bz2
Merged revisions 78192 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78192 | mark.dickinson | 2010-02-14 14:08:54 +0000 (Sun, 14 Feb 2010) | 9 lines Merged revisions 78189 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78189 | mark.dickinson | 2010-02-14 13:40:30 +0000 (Sun, 14 Feb 2010) | 1 line Silence more 'comparison between signed and unsigned' warnings. ........ ................
Diffstat (limited to 'Include')
-rw-r--r--Include/pymem.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Include/pymem.h b/Include/pymem.h
index 542acee..c8801bb 100644
--- a/Include/pymem.h
+++ b/Include/pymem.h
@@ -90,10 +90,10 @@ PyAPI_FUNC(void) PyMem_Free(void *);
*/
#define PyMem_New(type, n) \
- ( ((n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
+ ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
#define PyMem_NEW(type, n) \
- ( ((n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
+ ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
( (type *) PyMem_MALLOC((n) * sizeof(type)) ) )
/*
@@ -103,10 +103,10 @@ PyAPI_FUNC(void) PyMem_Free(void *);
* caller's memory error handler to not lose track of it.
*/
#define PyMem_Resize(p, type, n) \
- ( (p) = ((n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
+ ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
(type *) PyMem_Realloc((p), (n) * sizeof(type)) )
#define PyMem_RESIZE(p, type, n) \
- ( (p) = ((n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
+ ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
(type *) PyMem_REALLOC((p), (n) * sizeof(type)) )
/* PyMem{Del,DEL} are left over from ancient days, and shouldn't be used