From 4367eaabdfc5594ff8efda16e33a242fc4561472 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Oct 23 2012 10:13:28 +0000 Subject: - patchlevel 711 --- diff --git a/7.3.711 b/7.3.711 new file mode 100644 index 0000000..74ef3cb --- /dev/null +++ b/7.3.711 @@ -0,0 +1,178 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.711 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.711 (after 7.3.688) +Problem: vim.current.buffer is not available. (lilydjwg) +Solution: Use py3_PyUnicode_AsUTF8 instead of py3_PyUnicode_AsUTF8String. + (Ken Takata) +Files: src/if_python3.c + + +*** ../vim-7.3.710/src/if_python3.c 2012-10-21 01:46:56.000000000 +0200 +--- src/if_python3.c 2012-10-23 05:15:31.000000000 +0200 +*************** +*** 176,182 **** + # define PyImport_AppendInittab py3_PyImport_AppendInittab + # if PY_VERSION_HEX >= 0x030300f0 + # undef _PyUnicode_AsString +! # define _PyUnicode_AsString py3_PyUnicode_AsUTF8String + # else + # define _PyUnicode_AsString py3__PyUnicode_AsString + # endif +--- 176,182 ---- + # define PyImport_AppendInittab py3_PyImport_AppendInittab + # if PY_VERSION_HEX >= 0x030300f0 + # undef _PyUnicode_AsString +! # define _PyUnicode_AsString py3_PyUnicode_AsUTF8 + # else + # define _PyUnicode_AsString py3__PyUnicode_AsString + # endif +*************** +*** 286,296 **** + 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 + static char* (*py3__PyUnicode_AsString)(PyObject *unicode); +! #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); +--- 286,296 ---- + 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_AsUTF8)(PyObject *unicode); +! # else + static char* (*py3__PyUnicode_AsString)(PyObject *unicode); +! # 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,360 **** + {"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 + {"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, + {"Py_BuildValue", (PYTHON_PROC*)&py3_Py_BuildValue}, +! #else + {"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, + {"_Py_BuildValue_SizeT", (PYTHON_PROC*)&py3_Py_BuildValue}, +! #endif + {"PyMem_Free", (PYTHON_PROC*)&py3_PyMem_Free}, + {"PyMem_Malloc", (PYTHON_PROC*)&py3_PyMem_Malloc}, + {"PyList_New", (PYTHON_PROC*)&py3_PyList_New}, +--- 348,360 ---- + {"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 + {"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, + {"Py_BuildValue", (PYTHON_PROC*)&py3_Py_BuildValue}, +! # else + {"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, + {"_Py_BuildValue_SizeT", (PYTHON_PROC*)&py3_Py_BuildValue}, +! # endif + {"PyMem_Free", (PYTHON_PROC*)&py3_PyMem_Free}, + {"PyMem_Malloc", (PYTHON_PROC*)&py3_PyMem_Malloc}, + {"PyList_New", (PYTHON_PROC*)&py3_PyList_New}, +*************** +*** 406,416 **** + {"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 + {"_PyUnicode_AsString", (PYTHON_PROC*)&py3__PyUnicode_AsString}, +! #endif + {"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString}, + {"PyBytes_AsStringAndSize", (PYTHON_PROC*)&py3_PyBytes_AsStringAndSize}, + {"PyBytes_FromString", (PYTHON_PROC*)&py3_PyBytes_FromString}, +--- 406,416 ---- + {"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_AsUTF8", (PYTHON_PROC*)&py3_PyUnicode_AsUTF8}, +! # else + {"_PyUnicode_AsString", (PYTHON_PROC*)&py3__PyUnicode_AsString}, +! # endif + {"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString}, + {"PyBytes_AsStringAndSize", (PYTHON_PROC*)&py3_PyBytes_AsStringAndSize}, + {"PyBytes_FromString", (PYTHON_PROC*)&py3_PyBytes_FromString}, +*************** +*** 503,514 **** + + /* Load unicode functions separately as only the ucs2 or the ucs4 functions + * will be present in the library. */ +! #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 + ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString"); + ucs_decode = symbol_from_dll(hinstPy3, + "PyUnicodeUCS2_Decode"); +--- 503,514 ---- + + /* Load unicode functions separately as only the ucs2 or the ucs4 functions + * will be present in the library. */ +! # 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 + ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString"); + ucs_decode = symbol_from_dll(hinstPy3, + "PyUnicodeUCS2_Decode"); +*************** +*** 523,529 **** + ucs_as_encoded_string = symbol_from_dll(hinstPy3, + "PyUnicodeUCS4_AsEncodedString"); + } +! #endif + if (ucs_from_string && ucs_decode && ucs_as_encoded_string) + { + py3_PyUnicode_FromString = ucs_from_string; +--- 523,529 ---- + ucs_as_encoded_string = symbol_from_dll(hinstPy3, + "PyUnicodeUCS4_AsEncodedString"); + } +! # endif + if (ucs_from_string && ucs_decode && ucs_as_encoded_string) + { + py3_PyUnicode_FromString = ucs_from_string; +*** ../vim-7.3.710/src/version.c 2012-10-23 05:08:49.000000000 +0200 +--- src/version.c 2012-10-23 05:14:27.000000000 +0200 +*************** +*** 727,728 **** +--- 727,730 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 711, + /**/ + +-- +The fastest way to get an engineer to solve a problem is to declare that the +problem is unsolvable. No engineer can walk away from an unsolvable problem +until it's solved. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org ///