Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
d65a7c17
Commit
d65a7c17
authored
Dec 01, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missing malloc() result casts in embedding main program code
parent
1c864457
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Cython/Utility/Embed.c
Cython/Utility/Embed.c
+2
-2
No files found.
Cython/Utility/Embed.c
View file @
d65a7c17
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment