Mercurial > cpython-lru_cache-weakref
diff Objects/classobject.c @ 8496:1d8dab5aa7d1 legacy-trunk
Keep Microsoft's compiler happy.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 12 Jun 1998 15:03:58 +0000 |
| parents | 7160e529e9a1 |
| children | 9af95d7270df |
line wrap: on
line diff
--- a/Objects/classobject.c Fri Jun 12 14:28:38 1998 +0000 +++ b/Objects/classobject.c Fri Jun 12 15:03:58 1998 +0000 @@ -250,7 +250,6 @@ PyClassObject *c; PyObject *v; { - PyObject *temp; int i, n; if (v == NULL || !PyTuple_Check(v)) @@ -272,11 +271,9 @@ PyClassObject *c; PyObject *v; { - PyObject *temp; - if (v == NULL || !PyString_Check(v)) return "__name__ must be a string object"; - if (strlen(PyString_AS_STRING(v)) != PyString_GET_SIZE(v)) + if ((long)strlen(PyString_AS_STRING(v)) != PyString_GET_SIZE(v)) return "__name__ must not contain null bytes"; set_slot(&c->cl_name, v); return "";
