diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2014-12-01 08:26:46 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2014-12-01 08:26:46 +0100 |
commit | 42a7aa55e08fa8d15f7b18ba66ba792001b6d966 (patch) | |
tree | b20ae5f706bca02ba30047c66f935a35ea094a86 | |
parent | 31d5d476b5a9363badd5bcb45aefebaf27b4c5a6 (diff) | |
download | cython-42a7aa55e08fa8d15f7b18ba66ba792001b6d966.tar.gz |
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
-rw-r--r-- | Cython/Utility/Embed.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Utility/Embed.c b/Cython/Utility/Embed.c index fac123383..c275c2b60 100644 --- a/Cython/Utility/Embed.c +++ b/Cython/Utility/Embed.c @@ -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; |