|
Karsten Hopp |
02743b |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
02743b |
Subject: Patch 7.3.711
|
|
Karsten Hopp |
02743b |
Fcc: outbox
|
|
Karsten Hopp |
02743b |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
02743b |
Mime-Version: 1.0
|
|
Karsten Hopp |
02743b |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
02743b |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
02743b |
------------
|
|
Karsten Hopp |
02743b |
|
|
Karsten Hopp |
02743b |
Patch 7.3.711 (after 7.3.688)
|
|
Karsten Hopp |
02743b |
Problem: vim.current.buffer is not available. (lilydjwg)
|
|
Karsten Hopp |
02743b |
Solution: Use py3_PyUnicode_AsUTF8 instead of py3_PyUnicode_AsUTF8String.
|
|
Karsten Hopp |
02743b |
(Ken Takata)
|
|
Karsten Hopp |
02743b |
Files: src/if_python3.c
|
|
Karsten Hopp |
02743b |
|
|
Karsten Hopp |
02743b |
|
|
Karsten Hopp |
02743b |
*** ../vim-7.3.710/src/if_python3.c 2012-10-21 01:46:56.000000000 +0200
|
|
Karsten Hopp |
02743b |
--- src/if_python3.c 2012-10-23 05:15:31.000000000 +0200
|
|
Karsten Hopp |
02743b |
***************
|
|
Karsten Hopp |
02743b |
*** 176,182 ****
|
|
Karsten Hopp |
02743b |
# define PyImport_AppendInittab py3_PyImport_AppendInittab
|
|
Karsten Hopp |
02743b |
# if PY_VERSION_HEX >= 0x030300f0
|
|
Karsten Hopp |
02743b |
# undef _PyUnicode_AsString
|
|
Karsten Hopp |
02743b |
! # define _PyUnicode_AsString py3_PyUnicode_AsUTF8String
|
|
Karsten Hopp |
02743b |
# else
|
|
Karsten Hopp |
02743b |
# define _PyUnicode_AsString py3__PyUnicode_AsString
|
|
Karsten Hopp |
02743b |
# endif
|
|
Karsten Hopp |
02743b |
--- 176,182 ----
|
|
Karsten Hopp |
02743b |
# define PyImport_AppendInittab py3_PyImport_AppendInittab
|
|
Karsten Hopp |
02743b |
# if PY_VERSION_HEX >= 0x030300f0
|
|
Karsten Hopp |
02743b |
# undef _PyUnicode_AsString
|
|
Karsten Hopp |
02743b |
! # define _PyUnicode_AsString py3_PyUnicode_AsUTF8
|
|
Karsten Hopp |
02743b |
# else
|
|
Karsten Hopp |
02743b |
# define _PyUnicode_AsString py3__PyUnicode_AsString
|
|
Karsten Hopp |
02743b |
# endif
|
|
Karsten Hopp |
02743b |
***************
|
|
Karsten Hopp |
02743b |
*** 286,296 ****
|
|
Karsten Hopp |
02743b |
static PyObject* py3__Py_TrueStruct;
|
|
Karsten Hopp |
02743b |
static int (*py3_PyModule_AddObject)(PyObject *m, const char *name, PyObject *o);
|
|
Karsten Hopp |
02743b |
static int (*py3_PyImport_AppendInittab)(const char *name, PyObject* (*initfunc)(void));
|
|
Karsten Hopp |
02743b |
! #if PY_VERSION_HEX >= 0x030300f0
|
|
Karsten Hopp |
02743b |
! static char* (*py3_PyUnicode_AsUTF8String)(PyObject *unicode);
|
|
Karsten Hopp |
02743b |
! #else
|
|
Karsten Hopp |
02743b |
static char* (*py3__PyUnicode_AsString)(PyObject *unicode);
|
|
Karsten Hopp |
02743b |
! #endif
|
|
Karsten Hopp |
02743b |
static PyObject* (*py3_PyUnicode_AsEncodedString)(PyObject *unicode, const char* encoding, const char* errors);
|
|
Karsten Hopp |
02743b |
static char* (*py3_PyBytes_AsString)(PyObject *bytes);
|
|
Karsten Hopp |
02743b |
static int (*py3_PyBytes_AsStringAndSize)(PyObject *bytes, char **buffer, int *length);
|
|
Karsten Hopp |
02743b |
--- 286,296 ----
|
|
Karsten Hopp |
02743b |
static PyObject* py3__Py_TrueStruct;
|
|
Karsten Hopp |
02743b |
static int (*py3_PyModule_AddObject)(PyObject *m, const char *name, PyObject *o);
|
|
Karsten Hopp |
02743b |
static int (*py3_PyImport_AppendInittab)(const char *name, PyObject* (*initfunc)(void));
|
|
Karsten Hopp |
02743b |
! # if PY_VERSION_HEX >= 0x030300f0
|
|
Karsten Hopp |
02743b |
! static char* (*py3_PyUnicode_AsUTF8)(PyObject *unicode);
|
|
Karsten Hopp |
02743b |
! # else
|
|
Karsten Hopp |
02743b |
static char* (*py3__PyUnicode_AsString)(PyObject *unicode);
|
|
Karsten Hopp |
02743b |
! # endif
|
|
Karsten Hopp |
02743b |
static PyObject* (*py3_PyUnicode_AsEncodedString)(PyObject *unicode, const char* encoding, const char* errors);
|
|
Karsten Hopp |
02743b |
static char* (*py3_PyBytes_AsString)(PyObject *bytes);
|
|
Karsten Hopp |
02743b |
static int (*py3_PyBytes_AsStringAndSize)(PyObject *bytes, char **buffer, int *length);
|
|
Karsten Hopp |
02743b |
***************
|
|
Karsten Hopp |
02743b |
*** 348,360 ****
|
|
Karsten Hopp |
02743b |
{"PySys_SetArgv", (PYTHON_PROC*)&py3_PySys_SetArgv},
|
|
Karsten Hopp |
02743b |
{"Py_SetPythonHome", (PYTHON_PROC*)&py3_Py_SetPythonHome},
|
|
Karsten Hopp |
02743b |
{"Py_Initialize", (PYTHON_PROC*)&py3_Py_Initialize},
|
|
Karsten Hopp |
02743b |
! #ifndef PY_SSIZE_T_CLEAN
|
|
Karsten Hopp |
02743b |
{"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple},
|
|
Karsten Hopp |
02743b |
{"Py_BuildValue", (PYTHON_PROC*)&py3_Py_BuildValue},
|
|
Karsten Hopp |
02743b |
! #else
|
|
Karsten Hopp |
02743b |
{"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&py3_PyArg_ParseTuple},
|
|
Karsten Hopp |
02743b |
{"_Py_BuildValue_SizeT", (PYTHON_PROC*)&py3_Py_BuildValue},
|
|
Karsten Hopp |
02743b |
! #endif
|
|
Karsten Hopp |
02743b |
{"PyMem_Free", (PYTHON_PROC*)&py3_PyMem_Free},
|
|
Karsten Hopp |
02743b |
{"PyMem_Malloc", (PYTHON_PROC*)&py3_PyMem_Malloc},
|
|
Karsten Hopp |
02743b |
{"PyList_New", (PYTHON_PROC*)&py3_PyList_New},
|
|
Karsten Hopp |
02743b |
--- 348,360 ----
|
|
Karsten Hopp |
02743b |
{"PySys_SetArgv", (PYTHON_PROC*)&py3_PySys_SetArgv},
|
|
Karsten Hopp |
02743b |
{"Py_SetPythonHome", (PYTHON_PROC*)&py3_Py_SetPythonHome},
|
|
Karsten Hopp |
02743b |
{"Py_Initialize", (PYTHON_PROC*)&py3_Py_Initialize},
|
|
Karsten Hopp |
02743b |
! # ifndef PY_SSIZE_T_CLEAN
|
|
Karsten Hopp |
02743b |
{"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple},
|
|
Karsten Hopp |
02743b |
{"Py_BuildValue", (PYTHON_PROC*)&py3_Py_BuildValue},
|
|
Karsten Hopp |
02743b |
! # else
|
|
Karsten Hopp |
02743b |
{"_PyArg_ParseTuple_SizeT", (PYTHON_PROC*)&py3_PyArg_ParseTuple},
|
|
Karsten Hopp |
02743b |
{"_Py_BuildValue_SizeT", (PYTHON_PROC*)&py3_Py_BuildValue},
|
|
Karsten Hopp |
02743b |
! # endif
|
|
Karsten Hopp |
02743b |
{"PyMem_Free", (PYTHON_PROC*)&py3_PyMem_Free},
|
|
Karsten Hopp |
02743b |
{"PyMem_Malloc", (PYTHON_PROC*)&py3_PyMem_Malloc},
|
|
Karsten Hopp |
02743b |
{"PyList_New", (PYTHON_PROC*)&py3_PyList_New},
|
|
Karsten Hopp |
02743b |
***************
|
|
Karsten Hopp |
02743b |
*** 406,416 ****
|
|
Karsten Hopp |
02743b |
{"PyObject_Init", (PYTHON_PROC*)&py3__PyObject_Init},
|
|
Karsten Hopp |
02743b |
{"PyModule_AddObject", (PYTHON_PROC*)&py3_PyModule_AddObject},
|
|
Karsten Hopp |
02743b |
{"PyImport_AppendInittab", (PYTHON_PROC*)&py3_PyImport_AppendInittab},
|
|
Karsten Hopp |
02743b |
! #if PY_VERSION_HEX >= 0x030300f0
|
|
Karsten Hopp |
02743b |
! {"PyUnicode_AsUTF8String", (PYTHON_PROC*)&py3_PyUnicode_AsUTF8String},
|
|
Karsten Hopp |
02743b |
! #else
|
|
Karsten Hopp |
02743b |
{"_PyUnicode_AsString", (PYTHON_PROC*)&py3__PyUnicode_AsString},
|
|
Karsten Hopp |
02743b |
! #endif
|
|
Karsten Hopp |
02743b |
{"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString},
|
|
Karsten Hopp |
02743b |
{"PyBytes_AsStringAndSize", (PYTHON_PROC*)&py3_PyBytes_AsStringAndSize},
|
|
Karsten Hopp |
02743b |
{"PyBytes_FromString", (PYTHON_PROC*)&py3_PyBytes_FromString},
|
|
Karsten Hopp |
02743b |
--- 406,416 ----
|
|
Karsten Hopp |
02743b |
{"PyObject_Init", (PYTHON_PROC*)&py3__PyObject_Init},
|
|
Karsten Hopp |
02743b |
{"PyModule_AddObject", (PYTHON_PROC*)&py3_PyModule_AddObject},
|
|
Karsten Hopp |
02743b |
{"PyImport_AppendInittab", (PYTHON_PROC*)&py3_PyImport_AppendInittab},
|
|
Karsten Hopp |
02743b |
! # if PY_VERSION_HEX >= 0x030300f0
|
|
Karsten Hopp |
02743b |
! {"PyUnicode_AsUTF8", (PYTHON_PROC*)&py3_PyUnicode_AsUTF8},
|
|
Karsten Hopp |
02743b |
! # else
|
|
Karsten Hopp |
02743b |
{"_PyUnicode_AsString", (PYTHON_PROC*)&py3__PyUnicode_AsString},
|
|
Karsten Hopp |
02743b |
! # endif
|
|
Karsten Hopp |
02743b |
{"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString},
|
|
Karsten Hopp |
02743b |
{"PyBytes_AsStringAndSize", (PYTHON_PROC*)&py3_PyBytes_AsStringAndSize},
|
|
Karsten Hopp |
02743b |
{"PyBytes_FromString", (PYTHON_PROC*)&py3_PyBytes_FromString},
|
|
Karsten Hopp |
02743b |
***************
|
|
Karsten Hopp |
02743b |
*** 503,514 ****
|
|
Karsten Hopp |
02743b |
|
|
Karsten Hopp |
02743b |
/* Load unicode functions separately as only the ucs2 or the ucs4 functions
|
|
Karsten Hopp |
02743b |
* will be present in the library. */
|
|
Karsten Hopp |
02743b |
! #if PY_VERSION_HEX >= 0x030300f0
|
|
Karsten Hopp |
02743b |
ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicode_FromString");
|
|
Karsten Hopp |
02743b |
ucs_decode = symbol_from_dll(hinstPy3, "PyUnicode_Decode");
|
|
Karsten Hopp |
02743b |
ucs_as_encoded_string = symbol_from_dll(hinstPy3,
|
|
Karsten Hopp |
02743b |
"PyUnicode_AsEncodedString");
|
|
Karsten Hopp |
02743b |
! #else
|
|
Karsten Hopp |
02743b |
ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString");
|
|
Karsten Hopp |
02743b |
ucs_decode = symbol_from_dll(hinstPy3,
|
|
Karsten Hopp |
02743b |
"PyUnicodeUCS2_Decode");
|
|
Karsten Hopp |
02743b |
--- 503,514 ----
|
|
Karsten Hopp |
02743b |
|
|
Karsten Hopp |
02743b |
/* Load unicode functions separately as only the ucs2 or the ucs4 functions
|
|
Karsten Hopp |
02743b |
* will be present in the library. */
|
|
Karsten Hopp |
02743b |
! # if PY_VERSION_HEX >= 0x030300f0
|
|
Karsten Hopp |
02743b |
ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicode_FromString");
|
|
Karsten Hopp |
02743b |
ucs_decode = symbol_from_dll(hinstPy3, "PyUnicode_Decode");
|
|
Karsten Hopp |
02743b |
ucs_as_encoded_string = symbol_from_dll(hinstPy3,
|
|
Karsten Hopp |
02743b |
"PyUnicode_AsEncodedString");
|
|
Karsten Hopp |
02743b |
! # else
|
|
Karsten Hopp |
02743b |
ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString");
|
|
Karsten Hopp |
02743b |
ucs_decode = symbol_from_dll(hinstPy3,
|
|
Karsten Hopp |
02743b |
"PyUnicodeUCS2_Decode");
|
|
Karsten Hopp |
02743b |
***************
|
|
Karsten Hopp |
02743b |
*** 523,529 ****
|
|
Karsten Hopp |
02743b |
ucs_as_encoded_string = symbol_from_dll(hinstPy3,
|
|
Karsten Hopp |
02743b |
"PyUnicodeUCS4_AsEncodedString");
|
|
Karsten Hopp |
02743b |
}
|
|
Karsten Hopp |
02743b |
! #endif
|
|
Karsten Hopp |
02743b |
if (ucs_from_string && ucs_decode && ucs_as_encoded_string)
|
|
Karsten Hopp |
02743b |
{
|
|
Karsten Hopp |
02743b |
py3_PyUnicode_FromString = ucs_from_string;
|
|
Karsten Hopp |
02743b |
--- 523,529 ----
|
|
Karsten Hopp |
02743b |
ucs_as_encoded_string = symbol_from_dll(hinstPy3,
|
|
Karsten Hopp |
02743b |
"PyUnicodeUCS4_AsEncodedString");
|
|
Karsten Hopp |
02743b |
}
|
|
Karsten Hopp |
02743b |
! # endif
|
|
Karsten Hopp |
02743b |
if (ucs_from_string && ucs_decode && ucs_as_encoded_string)
|
|
Karsten Hopp |
02743b |
{
|
|
Karsten Hopp |
02743b |
py3_PyUnicode_FromString = ucs_from_string;
|
|
Karsten Hopp |
02743b |
*** ../vim-7.3.710/src/version.c 2012-10-23 05:08:49.000000000 +0200
|
|
Karsten Hopp |
02743b |
--- src/version.c 2012-10-23 05:14:27.000000000 +0200
|
|
Karsten Hopp |
02743b |
***************
|
|
Karsten Hopp |
02743b |
*** 727,728 ****
|
|
Karsten Hopp |
02743b |
--- 727,730 ----
|
|
Karsten Hopp |
02743b |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
02743b |
+ /**/
|
|
Karsten Hopp |
02743b |
+ 711,
|
|
Karsten Hopp |
02743b |
/**/
|
|
Karsten Hopp |
02743b |
|
|
Karsten Hopp |
02743b |
--
|
|
Karsten Hopp |
02743b |
The fastest way to get an engineer to solve a problem is to declare that the
|
|
Karsten Hopp |
02743b |
problem is unsolvable. No engineer can walk away from an unsolvable problem
|
|
Karsten Hopp |
02743b |
until it's solved.
|
|
Karsten Hopp |
02743b |
(Scott Adams - The Dilbert principle)
|
|
Karsten Hopp |
02743b |
|
|
Karsten Hopp |
02743b |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
02743b |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
02743b |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
02743b |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|