diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-10-23 05:17:37 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-10-23 05:17:37 +0200 |
commit | 9c9cbf13511522c05e8cc8d038a858608a158533 (patch) | |
tree | 1f3a9527c635485215f52196c202f51161cb5cb1 /src | |
parent | 12a753a5ca03fe8beddc06201104e785baccb471 (diff) |
updated for version 7.3.711v7.3.711
Problem: vim.current.buffer is not available. (lilydjwg)
Solution: Use py3_PyUnicode_AsUTF8 instead of py3_PyUnicode_AsUTF8String.
(Ken Takata)
Diffstat (limited to 'src')
-rw-r--r-- | src/if_python3.c | 30 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 17 insertions, 15 deletions
diff --git a/src/if_python3.c b/src/if_python3.c index e9f7400f80..3bca569590 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -176,7 +176,7 @@ static void init_structs(void); # define PyImport_AppendInittab py3_PyImport_AppendInittab # if PY_VERSION_HEX >= 0x030300f0 # undef _PyUnicode_AsString -# define _PyUnicode_AsString py3_PyUnicode_AsUTF8String +# define _PyUnicode_AsString py3_PyUnicode_AsUTF8 # else # define _PyUnicode_AsString py3__PyUnicode_AsString # endif @@ -286,11 +286,11 @@ static PyObject* py3__Py_FalseStruct; static PyObject* py3__Py_TrueStruct; static int (*py3_PyModule_AddObject)(PyObject *m, const char *name, PyObject *o); static int (*py3_PyImport_AppendInittab)(const char *name, PyObject* (*initfunc)(void)); -#if PY_VERSION_HEX >= 0x030300f0 -static char* (*py3_PyUnicode_AsUTF8String)(PyObject *unicode); -#else +# if PY_VERSION_HEX >= 0x030300f0 +static char* (*py3_PyUnicode_AsUTF8)(PyObject *unicode); +# else static char* (*py3__PyUnicode_AsString)(PyObject *unicode); -#endif +# endif static PyObject* (*py3_PyUnicode_AsEncodedString)(PyObject *unicode, const char* encoding, const char* errors); static char* (*py3_PyBytes_AsString)(PyObject *bytes); static int (*py3_PyBytes_AsStringAndSize)(PyObject *bytes, char **buffer, int *length); @@ -348,13 +348,13 @@ static struct {"PySys_SetArgv", (PYTHON_PROC*)&py3_PySys_SetArgv}, {"Py_SetPythonHome", (PYTHON_PROC*)&py3_Py_SetPythonHome}, {"Py_Initialize", (PYTHON_PROC*)&py3_Py_Initialize}, -#ifndef PY_SSIZE_T_CLEAN +# ifndef PY_SSIZE_T_CLEAN {"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, {"Py_BuildValue", (PYTHON_PROC*)&py3_Py_BuildValue}, -#else +# else {"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, {"_Py_BuildValue_SizeT", (PYTHON_PROC*)&py3_Py_BuildValue}, -#endif +# endif {"PyMem_Free", (PYTHON_PROC*)&py3_PyMem_Free}, {"PyMem_Malloc", (PYTHON_PROC*)&py3_PyMem_Malloc}, {"PyList_New", (PYTHON_PROC*)&py3_PyList_New}, @@ -406,11 +406,11 @@ static struct {"PyObject_Init", (PYTHON_PROC*)&py3__PyObject_Init}, {"PyModule_AddObject", (PYTHON_PROC*)&py3_PyModule_AddObject}, {"PyImport_AppendInittab", (PYTHON_PROC*)&py3_PyImport_AppendInittab}, -#if PY_VERSION_HEX >= 0x030300f0 - {"PyUnicode_AsUTF8String", (PYTHON_PROC*)&py3_PyUnicode_AsUTF8String}, -#else +# if PY_VERSION_HEX >= 0x030300f0 + {"PyUnicode_AsUTF8", (PYTHON_PROC*)&py3_PyUnicode_AsUTF8}, +# else {"_PyUnicode_AsString", (PYTHON_PROC*)&py3__PyUnicode_AsString}, -#endif +# endif {"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString}, {"PyBytes_AsStringAndSize", (PYTHON_PROC*)&py3_PyBytes_AsStringAndSize}, {"PyBytes_FromString", (PYTHON_PROC*)&py3_PyBytes_FromString}, @@ -503,12 +503,12 @@ py3_runtime_link_init(char *libname, int verbose) /* Load unicode functions separately as only the ucs2 or the ucs4 functions * will be present in the library. */ -#if PY_VERSION_HEX >= 0x030300f0 +# if PY_VERSION_HEX >= 0x030300f0 ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicode_FromString"); ucs_decode = symbol_from_dll(hinstPy3, "PyUnicode_Decode"); ucs_as_encoded_string = symbol_from_dll(hinstPy3, "PyUnicode_AsEncodedString"); -#else +# else ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString"); ucs_decode = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_Decode"); @@ -523,7 +523,7 @@ py3_runtime_link_init(char *libname, int verbose) ucs_as_encoded_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS4_AsEncodedString"); } -#endif +# endif if (ucs_from_string && ucs_decode && ucs_as_encoded_string) { py3_PyUnicode_FromString = ucs_from_string; diff --git a/src/version.c b/src/version.c index 3c774a9f8b..7968b722a8 100644 --- a/src/version.c +++ b/src/version.c @@ -726,6 +726,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 711, +/**/ 710, /**/ 709, |