cpython: 1ab8fa2277d9 (original) (raw)
Mercurial > cpython
changeset 75945:1ab8fa2277d9
Issue #3367: Merge fix from 3.2. [#3367]
Stefan Krah skrah@bytereef.org | |
---|---|
date | Mon, 26 Mar 2012 15:11:22 +0200 |
parents | 51016ff7f8c9(current diff)c0900fd6e4b3(diff) |
children | 3bb51f26f3bf |
files | |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-)[+] [-] Modules/python.c 6 |
line wrap: on
line diff
--- a/Modules/python.c +++ b/Modules/python.c @@ -22,9 +22,9 @@ extern wchar_t* _Py_DecodeUTF8_surrogate int main(int argc, char **argv) {
- wchar_t *argv_copy = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*(argc+1)); / We need a second copies, as Python might modify the first one. */
- wchar_t **argv_copy2 = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*(argc+1)); int i, res; char oldloc; / 754 requires that FP exceptions run in "no stop" mode by default, @@ -58,6 +58,8 @@ main(int argc, char **argv) } argv_copy2[i] = argv_copy[i]; }
- argv_copy2[argc] = argv_copy[argc] = NULL;
+ setlocale(LC_ALL, oldloc); free(oldloc); res = Py_Main(argc, argv_copy);