Commit d65a7c17 authored by Stefan Behnel's avatar Stefan Behnel

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

parent 1c864457
...@@ -95,7 +95,7 @@ __Pyx_char2wchar(char* arg) ...@@ -95,7 +95,7 @@ __Pyx_char2wchar(char* arg)
/* Overallocate; as multi-byte characters are in the argument, the /* Overallocate; as multi-byte characters are in the argument, the
actual output could use less memory. */ actual output could use less memory. */
argsize = strlen(arg) + 1; argsize = strlen(arg) + 1;
res = malloc(argsize*sizeof(wchar_t)); res = (wchar_t *)malloc(argsize*sizeof(wchar_t));
if (!res) goto oom; if (!res) goto oom;
in = (unsigned char*)arg; in = (unsigned char*)arg;
out = res; out = res;
...@@ -138,7 +138,7 @@ __Pyx_char2wchar(char* arg) ...@@ -138,7 +138,7 @@ __Pyx_char2wchar(char* arg)
/* Cannot use C locale for escaping; manually escape as if charset /* Cannot use C locale for escaping; manually escape as if charset
is ASCII (i.e. escape all bytes > 128. This will still roundtrip is ASCII (i.e. escape all bytes > 128. This will still roundtrip
correctly in the locale's charset, which must be an ASCII superset. */ 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; if (!res) goto oom;
in = (unsigned char*)arg; in = (unsigned char*)arg;
out = res; 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