Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
dfa66c1d
Commit
dfa66c1d
authored
Apr 17, 2010
by
Collin Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the --with-cxx-main build.
parent
28a691b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
Include/Python.h
Include/Python.h
+6
-0
Modules/python.c
Modules/python.c
+1
-1
No files found.
Include/Python.h
View file @
dfa66c1d
...
@@ -120,11 +120,17 @@
...
@@ -120,11 +120,17 @@
#include "pystrcmp.h"
#include "pystrcmp.h"
#include "dtoa.h"
#include "dtoa.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* _Py_Mangle is defined in compile.c */
/* _Py_Mangle is defined in compile.c */
PyAPI_FUNC
(
PyObject
*
)
_Py_Mangle
(
PyObject
*
p
,
PyObject
*
name
);
PyAPI_FUNC
(
PyObject
*
)
_Py_Mangle
(
PyObject
*
p
,
PyObject
*
name
);
/* _Py_char2wchar lives in python.c */
/* _Py_char2wchar lives in python.c */
PyAPI_FUNC
(
wchar_t
*
)
_Py_char2wchar
(
char
*
);
PyAPI_FUNC
(
wchar_t
*
)
_Py_char2wchar
(
char
*
);
#ifdef __cplusplus
}
#endif
/* Convert a possibly signed character to a nonnegative int */
/* Convert a possibly signed character to a nonnegative int */
/* XXX This assumes characters are 8 bits wide */
/* XXX This assumes characters are 8 bits wide */
...
...
Modules/python.c
View file @
dfa66c1d
...
@@ -57,7 +57,7 @@ _Py_char2wchar(char* arg)
...
@@ -57,7 +57,7 @@ _Py_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
=
PyMem_Malloc
(
argsize
*
sizeof
(
wchar_t
));
res
=
(
wchar_t
*
)
PyMem_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
;
...
...
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