File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 120120#include "pystrcmp.h"
121121#include "dtoa.h"
122122
123+ #ifdef __cplusplus
124+ extern "C" {
125+ #endif
123126/* _Py_Mangle is defined in compile.c */
124127PyAPI_FUNC (PyObject * ) _Py_Mangle (PyObject * p , PyObject * name );
125128
126129/* _Py_char2wchar lives in python.c */
127130PyAPI_FUNC (wchar_t * ) _Py_char2wchar (char * );
131+ #ifdef __cplusplus
132+ }
133+ #endif
128134
129135/* Convert a possibly signed character to a nonnegative int */
130136/* 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)
5757 /* Overallocate; as multi-byte characters are in the argument, the
5858 actual output could use less memory. */
5959 argsize = strlen (arg ) + 1 ;
60- res = PyMem_Malloc (argsize * sizeof (wchar_t ));
60+ res = ( wchar_t * ) PyMem_Malloc (argsize * sizeof (wchar_t ));
6161 if (!res ) goto oom ;
6262 in = (unsigned char * )arg ;
6363 out = res ;
You can’t perform that action at this time.
0 commit comments