Commit 42a7aa55 authored by Stefan Behnel's avatar Stefan Behnel

add missing malloc() result casts in embedding main program code

--HG--
extra : transplant_source : %FE%A5%0B%83%D2%A8d%B01w%1C%3C%C8%A6%ED%FE%19%3D%00%FE
parent 31d5d476
......@@ -95,7 +95,7 @@ __Pyx_char2wchar(char* arg)
/* Overallocate; as multi-byte characters are in the argument, the
actual output could use less memory. */
argsize = strlen(arg) + 1;
res = malloc(argsize*sizeof(wchar_t));
res = (wchar_t *)malloc(argsize*sizeof(wchar_t));
if (!res) goto oom;
in = (unsigned char*)arg;
out = res;
......@@ -138,7 +138,7 @@ __Pyx_char2wchar(char* arg)
/* Cannot use C locale for escaping; manually escape as if charset
is ASCII (i.e. escape all bytes > 128. This will still roundtrip
correctly in the locale's charset, which must be an ASCII superset. */
res = malloc((strlen(arg)+1)*sizeof(wchar_t));
res = (wchar_t *)malloc((strlen(arg)+1)*sizeof(wchar_t));
if (!res) goto oom;
in = (unsigned char*)arg;
out = res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment