From ad89bbcd887724a1b199671dce9ae7c7718f6866 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 28 Jun 2000 21:57:18 +0000 Subject: Trent Mick: change a few casts for Win64 compatibility. --- Objects/classobject.c | 2 +- Objects/object.c | 2 +- 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 { -- cgit v0.12