From: R David Murray Date: Wed, 10 Jul 2013 15:57:39 +0000 (-0400) Subject: Merge: #18399: fix comment typo. X-Git-Tag: v3.4.0a1~268 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=609142ef05c4b71697e7819f47cf2512e6b8d85e;p=python Merge: #18399: fix comment typo. --- 609142ef05c4b71697e7819f47cf2512e6b8d85e diff --cc Modules/python.c index 0ad1130f19,8a548d3ac3..71335deb5a --- a/Modules/python.c +++ b/Modules/python.c @@@ -18,19 -18,11 +18,19 @@@ wmain(int argc, wchar_t **argv int main(int argc, char **argv) { - wchar_t **argv_copy = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*(argc+1)); + wchar_t **argv_copy; - /* We need a second copies, as Python might modify the first one. */ + /* We need a second copy, as Python might modify the first one. */ - wchar_t **argv_copy2 = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*(argc+1)); + wchar_t **argv_copy2; int i, res; char *oldloc; + + argv_copy = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1)); + argv_copy2 = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1)); + if (!argv_copy || !argv_copy2) { + fprintf(stderr, "out of memory\n"); + return 1; + } + /* 754 requires that FP exceptions run in "no stop" mode by default, * and until C vendors implement C99's ways to control FP exceptions, * Python requires non-stop mode. Alas, some platforms enable FP