]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
restore compilation on OpenBSD #4146
authorBenjamin Peterson <benjamin@python.org>
Sun, 19 Oct 2008 14:15:00 +0000 (14:15 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 19 Oct 2008 14:15:00 +0000 (14:15 +0000)
Misc/NEWS
Modules/python.c

index a9adda9ec60780070742c38492c667f689d2088c..5b5a125af4903aeef4daefa2a01534eb8cdb69c4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,6 +15,8 @@ What's New in Python 3.0 beta 5
 Core and Builtins
 -----------------
 
+- Issue #4146: Compilation on OpenBSD has been restored.
+
 - Issue #3574: compile() incorrectly handled source code encoded as Latin-1.
 
 - Issues #2384 and #3975: Tracebacks were not correctly printed when the
index bf1ba9a698f4b9ea8108e86b24068c448d99feb9..9e7888999f491df4266dce9824a085bba18cc30c 100644 (file)
@@ -17,9 +17,9 @@ wmain(int argc, wchar_t **argv)
 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 @@ main(int argc, char **argv)
                        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");