changeset 3910:2a7b2943be22 v7.3.711

updated for version 7.3.711 Problem: vim.current.buffer is not available. (lilydjwg) Solution: Use py3_PyUnicode_AsUTF8 instead of py3_PyUnicode_AsUTF8String. (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Tue, 23 Oct 2012 05:17:37 +0200
parents eb8c38e45aee
children b161d3c5b588
files src/if_python3.c src/version.c
diffstat 2 files changed, 17 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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
 
     /* 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
 	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;
--- 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,