summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-06-28 21:57:18 (GMT)
committerGuido van Rossum <guido@python.org>2000-06-28 21:57:18 (GMT)
commitad89bbcd887724a1b199671dce9ae7c7718f6866 (patch)
treefe5072cbbb7d0d795396d2fdbcb48ca181f1b47f
parent2c9cb7aff3c19328f767d41d429549c1f7d8863f (diff)
downloadcpython-ad89bbcd887724a1b199671dce9ae7c7718f6866.zip
cpython-ad89bbcd887724a1b199671dce9ae7c7718f6866.tar.gz
cpython-ad89bbcd887724a1b199671dce9ae7c7718f6866.tar.bz2
Trent Mick: change a few casts for Win64 compatibility.
-rw-r--r--Objects/classobject.c2
-rw-r--r--Objects/object.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 04362a7..9e1d1b2 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -283,7 +283,7 @@ set_name(c, v)
{
if (v == NULL || !PyString_Check(v))
return "__name__ must be a string object";
- if ((long)strlen(PyString_AS_STRING(v)) != PyString_GET_SIZE(v))
+ if (strlen(PyString_AS_STRING(v)) != (size_t)PyString_GET_SIZE(v))
return "__name__ must not contain null bytes";
set_slot(&c->cl_name, v);
return "";
diff --git a/Objects/object.c b/Objects/object.c
index 5560792..9a0e87c 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -366,7 +366,7 @@ make_pair(v, w)
if (pair == NULL) {
return NULL;
}
- if ((long)v <= (long)w) {
+ if (v <= w) {
PyTuple_SET_ITEM(pair, 0, PyLong_FromVoidPtr((void *)v));
PyTuple_SET_ITEM(pair, 1, PyLong_FromVoidPtr((void *)w));
} else {