diff options
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r-- | Python/modsupport.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c index aabee8f..3ae3fea 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -9,7 +9,7 @@ typedef double va_double; static PyObject *va_build_value(const char *, va_list, int); /* Package context -- the full module name for package imports */ -char *_Py_PackageContext = NULL; +const char *_Py_PackageContext = NULL; /* Helper for mkvalue() to scan the length of a format */ @@ -286,8 +286,8 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags) } else { if (n < 0) - n = Py_UNICODE_strlen(u); - v = PyUnicode_FromUnicode(u, n); + n = wcslen(u); + v = PyUnicode_FromWideChar(u, n); } return v; } @@ -487,7 +487,7 @@ va_build_value(const char *format, va_list va, int flags) PyObject * -PyEval_CallFunction(PyObject *obj, const char *format, ...) +PyEval_CallFunction(PyObject *callable, const char *format, ...) { va_list vargs; PyObject *args; @@ -501,7 +501,7 @@ PyEval_CallFunction(PyObject *obj, const char *format, ...) if (args == NULL) return NULL; - res = PyEval_CallObject(obj, args); + res = PyEval_CallObject(callable, args); Py_DECREF(args); return res; @@ -509,14 +509,14 @@ PyEval_CallFunction(PyObject *obj, const char *format, ...) PyObject * -PyEval_CallMethod(PyObject *obj, const char *methodname, const char *format, ...) +PyEval_CallMethod(PyObject *obj, const char *name, const char *format, ...) { va_list vargs; PyObject *meth; PyObject *args; PyObject *res; - meth = PyObject_GetAttrString(obj, methodname); + meth = PyObject_GetAttrString(obj, name); if (meth == NULL) return NULL; |