]> granicus.if.org Git - python/commitdiff
Fix MSVC warnings.
authorGuido van Rossum <guido@python.org>
Mon, 12 Aug 2002 19:25:08 +0000 (19:25 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 12 Aug 2002 19:25:08 +0000 (19:25 +0000)
Objects/typeobject.c

index 766318e0caa39fcd6d3d9d3d6919661d2e572121..bb05e6b87d248e47134d6aafc24eab64e8357040 100644 (file)
@@ -940,9 +940,9 @@ subtype_getweakref(PyObject *obj, void *context)
        }
        assert(obj->ob_type->tp_weaklistoffset > 0);
        assert(obj->ob_type->tp_weaklistoffset + sizeof(PyObject *) <=
-              obj->ob_type->tp_basicsize);
+              (size_t)(obj->ob_type->tp_basicsize));
        weaklistptr = (PyObject **)
-               ((void *)obj + obj->ob_type->tp_weaklistoffset);
+               ((char *)obj + obj->ob_type->tp_weaklistoffset);
        if (*weaklistptr == NULL)
                result = Py_None;
        else