]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Trent Mick: change a few casts for Win64 compatibility.
authorGuido van Rossum <guido@python.org>
Wed, 28 Jun 2000 21:57:18 +0000 (21:57 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 28 Jun 2000 21:57:18 +0000 (21:57 +0000)
Objects/classobject.c
Objects/object.c

index 04362a74afdcc48697ef5e0add9e212cca7ff1d5..9e1d1b2b3f97c33977dadc35f21c5fd6504abaca 100644 (file)
@@ -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 "";
index 556079276cacf8fd98a1c66af14e9ec114222131..9a0e87c6ef61992177877d613e064ddb3569a9f1 100644 (file)
@@ -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 {