Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 5317:c72c7e1930b3 legacy-trunk
Keep gcc -Wall and Microsoft VC happy.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 11 Apr 1997 20:37:35 +0000 |
| parents | bc8832b52b50 |
| children | 5880384d7c71 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Fri Apr 11 20:27:03 1997 +0000 +++ b/Python/bltinmodule.c Fri Apr 11 20:37:35 1997 +0000 @@ -42,6 +42,8 @@ #include "mymath.h" +#include <ctype.h> + #ifdef HAVE_UNISTD_H #include <unistd.h> #endif @@ -233,7 +235,7 @@ err_setstr(ValueError, "chr() arg not in range(256)"); return NULL; } - s[0] = x; + s[0] = (char)x; return newsizedstringobject(s, 1); } @@ -301,7 +303,7 @@ object *args; { object *r, *i, *tmp; - number_methods *nbr, *nbi; + number_methods *nbr, *nbi = NULL; Py_complex cr, ci; int own_r = 0; @@ -484,7 +486,7 @@ return NULL; } str = getstringvalue(cmd); - if (strlen(str) != getstringsize(cmd)) { + if ((int)strlen(str) != getstringsize(cmd)) { err_setstr(ValueError, "embedded '\\0' in string arg"); return NULL;
