File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 120
120
#include "pystrcmp.h"
121
121
#include "dtoa.h"
122
122
123
+ #ifdef __cplusplus
124
+ extern "C" {
125
+ #endif
123
126
/* _Py_Mangle is defined in compile.c */
124
127
PyAPI_FUNC (PyObject * ) _Py_Mangle (PyObject * p , PyObject * name );
125
128
126
129
/* _Py_char2wchar lives in python.c */
127
130
PyAPI_FUNC (wchar_t * ) _Py_char2wchar (char * );
131
+ #ifdef __cplusplus
132
+ }
133
+ #endif
128
134
129
135
/* Convert a possibly signed character to a nonnegative int */
130
136
/* XXX This assumes characters are 8 bits wide */
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ _Py_char2wchar(char* arg)
57
57
/* Overallocate; as multi-byte characters are in the argument, the
58
58
actual output could use less memory. */
59
59
argsize = strlen (arg ) + 1 ;
60
- res = PyMem_Malloc (argsize * sizeof (wchar_t ));
60
+ res = ( wchar_t * ) PyMem_Malloc (argsize * sizeof (wchar_t ));
61
61
if (!res ) goto oom ;
62
62
in = (unsigned char * )arg ;
63
63
out = res ;
You can’t perform that action at this time.
0 commit comments