summaryrefslogtreecommitdiffstats
path: root/Modules/zipimport.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-12-30 23:06:14 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-12-30 23:06:14 (GMT)
commit5eaeaf9174b5cbaefd7b36e2c0cb23ddf808c2c0 (patch)
treea17083395b40b44d4a312f196fc101c6788f5cbc /Modules/zipimport.c
parentacda3394bbfb1db3b22673a80cb2d7e3c68b3da9 (diff)
downloadcpython-5eaeaf9174b5cbaefd7b36e2c0cb23ddf808c2c0.zip
cpython-5eaeaf9174b5cbaefd7b36e2c0cb23ddf808c2c0.tar.gz
cpython-5eaeaf9174b5cbaefd7b36e2c0cb23ddf808c2c0.tar.bz2
Added casts to forestall warnings with MetroWerks.
Diffstat (limited to 'Modules/zipimport.c')
-rw-r--r--Modules/zipimport.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index 863ce42..c8f7e34 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -685,7 +685,7 @@ read_directory(char *archive)
"'%.200s'", archive);
return NULL;
}
- if (get_long(endof_central_dir) != 0x06054B50) {
+ if (get_long((unsigned char *)endof_central_dir) != 0x06054B50) {
/* Bad: End of Central Dir signature */
fclose(fp);
PyErr_Format(ZipImportError, "not a Zip file: "
@@ -693,7 +693,7 @@ read_directory(char *archive)
return NULL;
}
- header_offset = get_long(endof_central_dir + 16);
+ header_offset = get_long((unsigned char *)endof_central_dir + 16);
files = PyDict_New();
if (files == NULL)
@@ -911,7 +911,7 @@ unmarshal_code(char *pathname, PyObject *data, time_t mtime)
return NULL;
}
- if (get_long(buf) != PyImport_GetMagicNumber()) {
+ if (get_long((unsigned char *)buf) != PyImport_GetMagicNumber()) {
if (Py_VerboseFlag)
PySys_WriteStderr("# %s has bad magic\n",
pathname);
@@ -919,7 +919,7 @@ unmarshal_code(char *pathname, PyObject *data, time_t mtime)
return Py_None; /* signal caller to try alternative */
}
- if (mtime != 0 && !eq_mtime(get_long(buf + 4), mtime)) {
+ if (mtime != 0 && !eq_mtime(get_long((unsigned char *)buf + 4), mtime)) {
if (Py_VerboseFlag)
PySys_WriteStderr("# %s has bad mtime\n",
pathname);