diff options
author | Guido van Rossum <guido@python.org> | 1997-04-11 20:37:35 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-04-11 20:37:35 (GMT) |
commit | 6bf62dad9e83003a70aef4158df063697926ba7c (patch) | |
tree | 8aa964aef3976a2a0b7d1215bdbd7c61b0b8f16d /Python/import.c | |
parent | 90126035cab1aad6edbc62376a9ff9cb0453523f (diff) | |
download | cpython-6bf62dad9e83003a70aef4158df063697926ba7c.zip cpython-6bf62dad9e83003a70aef4158df063697926ba7c.tar.gz cpython-6bf62dad9e83003a70aef4158df063697926ba7c.tar.bz2 |
Keep gcc -Wall and Microsoft VC happy.
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Python/import.c b/Python/import.c index 06350b7..8dadc0e 100644 --- a/Python/import.c +++ b/Python/import.c @@ -436,6 +436,7 @@ find_module(name, path, buf, buflen, p_fp) FILE *fp = NULL; #ifdef MS_COREDLL + extern FILE *PyWin_FindRegisteredModule(); if ((fp=PyWin_FindRegisteredModule(name, &fdp, buf, buflen))!=NULL) { *p_fp = fp; return fdp; @@ -460,7 +461,7 @@ find_module(name, path, buf, buflen, p_fp) if (len + 2 + namelen + import_maxsuffixsize >= buflen) continue; /* Too long */ strcpy(buf, getstringvalue(v)); - if (strlen(buf) != len) + if ((int)strlen(buf) != len) continue; /* v contains '\0' */ #ifdef macintosh if ( PyMac_FindResourceModule(name, buf) ) { @@ -740,10 +741,10 @@ imp_get_magic(self, args) if (!newgetargs(args, "")) return NULL; - buf[0] = (MAGIC >> 0) & 0xff; - buf[1] = (MAGIC >> 8) & 0xff; - buf[2] = (MAGIC >> 16) & 0xff; - buf[3] = (MAGIC >> 24) & 0xff; + buf[0] = (char) ((MAGIC >> 0) & 0xff); + buf[1] = (char) ((MAGIC >> 8) & 0xff); + buf[2] = (char) ((MAGIC >> 16) & 0xff); + buf[3] = (char) ((MAGIC >> 24) & 0xff); return newsizedstringobject(buf, 4); } |