Mercurial > cpython-lru_cache-weakref
diff Modules/python.c @ 49554:26bc0cd0108b
restore compilation on OpenBSD #4146
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sun, 19 Oct 2008 14:15:00 +0000 |
| parents | 1e5b2050ec6a |
| children | a5f0371850ff |
line wrap: on
line diff
--- a/Modules/python.c Sun Oct 19 14:07:49 2008 +0000 +++ b/Modules/python.c Sun Oct 19 14:15:00 2008 +0000 @@ -17,9 +17,9 @@ int main(int argc, char **argv) { - wchar_t **argv_copy = PyMem_Malloc(sizeof(wchar_t*)*argc); + wchar_t **argv_copy = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*argc); /* We need a second copies, as Python might modify the first one. */ - wchar_t **argv_copy2 = PyMem_Malloc(sizeof(wchar_t*)*argc); + wchar_t **argv_copy2 = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*argc); int i, res; char *oldloc; /* 754 requires that FP exceptions run in "no stop" mode by default, @@ -54,7 +54,7 @@ fprintf(stderr, "Could not convert argument %d to string\n", i); return 1; } - argv_copy[i] = PyMem_Malloc((argsize+1)*sizeof(wchar_t)); + argv_copy[i] = (wchar_t *)PyMem_Malloc((argsize+1)*sizeof(wchar_t)); argv_copy2[i] = argv_copy[i]; if (!argv_copy[i]) { fprintf(stderr, "out of memory\n");
