Kaydet (Commit) dfa66c1d authored tarafından Collin Winter's avatar Collin Winter

Fix the --with-cxx-main build.

üst 28a691b7
......@@ -120,11 +120,17 @@
#include "pystrcmp.h"
#include "dtoa.h"
#ifdef __cplusplus
extern "C" {
#endif
/* _Py_Mangle is defined in compile.c */
PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
/* _Py_char2wchar lives in python.c */
PyAPI_FUNC(wchar_t *) _Py_char2wchar(char *);
#ifdef __cplusplus
}
#endif
/* Convert a possibly signed character to a nonnegative int */
/* XXX This assumes characters are 8 bits wide */
......
......@@ -57,7 +57,7 @@ _Py_char2wchar(char* arg)
/* Overallocate; as multi-byte characters are in the argument, the
actual output could use less memory. */
argsize = strlen(arg) + 1;
res = PyMem_Malloc(argsize*sizeof(wchar_t));
res = (wchar_t*)PyMem_Malloc(argsize*sizeof(wchar_t));
if (!res) goto oom;
in = (unsigned char*)arg;
out = res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment