comparison Modules/python.c @ 60649:c532afb0fa89

Fix the --with-cxx-main build.
author Collin Winter <collinw@gmail.com>
date Sat, 17 Apr 2010 00:20:57 +0000
parents 62d11785204f
children fe6b6c189bb4
comparison
equal deleted inserted replaced
60648:7b69e630d237 60649:c532afb0fa89
55 /* Try conversion with mbrtwoc (C99), and escape non-decodable bytes. */ 55 /* Try conversion with mbrtwoc (C99), and escape non-decodable bytes. */
56 56
57 /* Overallocate; as multi-byte characters are in the argument, the 57 /* Overallocate; as multi-byte characters are in the argument, the
58 actual output could use less memory. */ 58 actual output could use less memory. */
59 argsize = strlen(arg) + 1; 59 argsize = strlen(arg) + 1;
60 res = PyMem_Malloc(argsize*sizeof(wchar_t)); 60 res = (wchar_t*)PyMem_Malloc(argsize*sizeof(wchar_t));
61 if (!res) goto oom; 61 if (!res) goto oom;
62 in = (unsigned char*)arg; 62 in = (unsigned char*)arg;
63 out = res; 63 out = res;
64 memset(&mbs, 0, sizeof mbs); 64 memset(&mbs, 0, sizeof mbs);
65 while (argsize) { 65 while (argsize) {