|
Karsten Hopp |
b5ebfe |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
b5ebfe |
Subject: Patch 7.3.825
|
|
Karsten Hopp |
b5ebfe |
Fcc: outbox
|
|
Karsten Hopp |
b5ebfe |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
b5ebfe |
Mime-Version: 1.0
|
|
Karsten Hopp |
b5ebfe |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
b5ebfe |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
b5ebfe |
------------
|
|
Karsten Hopp |
b5ebfe |
|
|
Karsten Hopp |
b5ebfe |
Patch 7.3.825
|
|
Karsten Hopp |
b5ebfe |
Problem: With Python errors are not always clear.
|
|
Karsten Hopp |
b5ebfe |
Solution: Print the stack trace, unless :silent is used. (ZyX)
|
|
Karsten Hopp |
b5ebfe |
Files: src/if_python3.c, src/if_python.c
|
|
Karsten Hopp |
b5ebfe |
|
|
Karsten Hopp |
b5ebfe |
|
|
Karsten Hopp |
b5ebfe |
*** ../vim-7.3.824/src/if_python3.c 2013-02-13 14:17:00.000000000 +0100
|
|
Karsten Hopp |
b5ebfe |
--- src/if_python3.c 2013-02-20 15:26:03.000000000 +0100
|
|
Karsten Hopp |
b5ebfe |
***************
|
|
Karsten Hopp |
b5ebfe |
*** 122,127 ****
|
|
Karsten Hopp |
b5ebfe |
--- 122,128 ----
|
|
Karsten Hopp |
b5ebfe |
# define PyDict_SetItemString py3_PyDict_SetItemString
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_BadArgument py3_PyErr_BadArgument
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_Clear py3_PyErr_Clear
|
|
Karsten Hopp |
b5ebfe |
+ # define PyErr_PrintEx py3_PyErr_PrintEx
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_NoMemory py3_PyErr_NoMemory
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_Occurred py3_PyErr_Occurred
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_SetNone py3_PyErr_SetNone
|
|
Karsten Hopp |
b5ebfe |
***************
|
|
Karsten Hopp |
b5ebfe |
*** 279,284 ****
|
|
Karsten Hopp |
b5ebfe |
--- 280,286 ----
|
|
Karsten Hopp |
b5ebfe |
static void* (*py3_PyMem_Malloc)(size_t);
|
|
Karsten Hopp |
b5ebfe |
static int (*py3_Py_IsInitialized)(void);
|
|
Karsten Hopp |
b5ebfe |
static void (*py3_PyErr_Clear)(void);
|
|
Karsten Hopp |
b5ebfe |
+ static void (*py3_PyErr_PrintEx)(int);
|
|
Karsten Hopp |
b5ebfe |
static PyObject*(*py3__PyObject_Init)(PyObject *, PyTypeObject *);
|
|
Karsten Hopp |
b5ebfe |
static iternextfunc py3__PyObject_NextNotImplemented;
|
|
Karsten Hopp |
b5ebfe |
static PyObject* py3__Py_NoneStruct;
|
|
Karsten Hopp |
b5ebfe |
***************
|
|
Karsten Hopp |
b5ebfe |
*** 403,408 ****
|
|
Karsten Hopp |
b5ebfe |
--- 405,411 ----
|
|
Karsten Hopp |
b5ebfe |
{"_Py_FalseStruct", (PYTHON_PROC*)&py3__Py_FalseStruct},
|
|
Karsten Hopp |
b5ebfe |
{"_Py_TrueStruct", (PYTHON_PROC*)&py3__Py_TrueStruct},
|
|
Karsten Hopp |
b5ebfe |
{"PyErr_Clear", (PYTHON_PROC*)&py3_PyErr_Clear},
|
|
Karsten Hopp |
b5ebfe |
+ {"PyErr_PrintEx", (PYTHON_PROC*)&py3_PyErr_PrintEx},
|
|
Karsten Hopp |
b5ebfe |
{"PyObject_Init", (PYTHON_PROC*)&py3__PyObject_Init},
|
|
Karsten Hopp |
b5ebfe |
{"PyModule_AddObject", (PYTHON_PROC*)&py3_PyModule_AddObject},
|
|
Karsten Hopp |
b5ebfe |
{"PyImport_AppendInittab", (PYTHON_PROC*)&py3_PyImport_AppendInittab},
|
|
Karsten Hopp |
b5ebfe |
***************
|
|
Karsten Hopp |
b5ebfe |
*** 842,848 ****
|
|
Karsten Hopp |
b5ebfe |
--- 845,855 ----
|
|
Karsten Hopp |
b5ebfe |
r = PyRun_String(PyBytes_AsString(cmdbytes), Py_eval_input,
|
|
Karsten Hopp |
b5ebfe |
globals, globals);
|
|
Karsten Hopp |
b5ebfe |
if (r == NULL)
|
|
Karsten Hopp |
b5ebfe |
+ {
|
|
Karsten Hopp |
b5ebfe |
+ if (PyErr_Occurred() && !msg_silent)
|
|
Karsten Hopp |
b5ebfe |
+ PyErr_PrintEx(0);
|
|
Karsten Hopp |
b5ebfe |
EMSG(_("E860: Eval did not return a valid python 3 object"));
|
|
Karsten Hopp |
b5ebfe |
+ }
|
|
Karsten Hopp |
b5ebfe |
else
|
|
Karsten Hopp |
b5ebfe |
{
|
|
Karsten Hopp |
b5ebfe |
if (ConvertFromPyObject(r, rettv) == -1)
|
|
Karsten Hopp |
b5ebfe |
*** ../vim-7.3.824/src/if_python.c 2013-02-13 14:17:00.000000000 +0100
|
|
Karsten Hopp |
b5ebfe |
--- src/if_python.c 2013-02-20 15:26:03.000000000 +0100
|
|
Karsten Hopp |
b5ebfe |
***************
|
|
Karsten Hopp |
b5ebfe |
*** 148,153 ****
|
|
Karsten Hopp |
b5ebfe |
--- 148,154 ----
|
|
Karsten Hopp |
b5ebfe |
# define PyDict_SetItemString dll_PyDict_SetItemString
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_BadArgument dll_PyErr_BadArgument
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_Clear dll_PyErr_Clear
|
|
Karsten Hopp |
b5ebfe |
+ # define PyErr_PrintEx dll_PyErr_PrintEx
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_NoMemory dll_PyErr_NoMemory
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_Occurred dll_PyErr_Occurred
|
|
Karsten Hopp |
b5ebfe |
# define PyErr_SetNone dll_PyErr_SetNone
|
|
Karsten Hopp |
b5ebfe |
***************
|
|
Karsten Hopp |
b5ebfe |
*** 251,256 ****
|
|
Karsten Hopp |
b5ebfe |
--- 252,258 ----
|
|
Karsten Hopp |
b5ebfe |
static int(*dll_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item);
|
|
Karsten Hopp |
b5ebfe |
static int(*dll_PyErr_BadArgument)(void);
|
|
Karsten Hopp |
b5ebfe |
static void(*dll_PyErr_Clear)(void);
|
|
Karsten Hopp |
b5ebfe |
+ static void(*dll_PyErr_PrintEx)(int);
|
|
Karsten Hopp |
b5ebfe |
static PyObject*(*dll_PyErr_NoMemory)(void);
|
|
Karsten Hopp |
b5ebfe |
static PyObject*(*dll_PyErr_Occurred)(void);
|
|
Karsten Hopp |
b5ebfe |
static void(*dll_PyErr_SetNone)(PyObject *);
|
|
Karsten Hopp |
b5ebfe |
***************
|
|
Karsten Hopp |
b5ebfe |
*** 380,385 ****
|
|
Karsten Hopp |
b5ebfe |
--- 382,388 ----
|
|
Karsten Hopp |
b5ebfe |
{"PyDict_SetItemString", (PYTHON_PROC*)&dll_PyDict_SetItemString},
|
|
Karsten Hopp |
b5ebfe |
{"PyErr_BadArgument", (PYTHON_PROC*)&dll_PyErr_BadArgument},
|
|
Karsten Hopp |
b5ebfe |
{"PyErr_Clear", (PYTHON_PROC*)&dll_PyErr_Clear},
|
|
Karsten Hopp |
b5ebfe |
+ {"PyErr_PrintEx", (PYTHON_PROC*)&dll_PyErr_PrintEx},
|
|
Karsten Hopp |
b5ebfe |
{"PyErr_NoMemory", (PYTHON_PROC*)&dll_PyErr_NoMemory},
|
|
Karsten Hopp |
b5ebfe |
{"PyErr_Occurred", (PYTHON_PROC*)&dll_PyErr_Occurred},
|
|
Karsten Hopp |
b5ebfe |
{"PyErr_SetNone", (PYTHON_PROC*)&dll_PyErr_SetNone},
|
|
Karsten Hopp |
b5ebfe |
***************
|
|
Karsten Hopp |
b5ebfe |
*** 856,862 ****
|
|
Karsten Hopp |
b5ebfe |
--- 859,869 ----
|
|
Karsten Hopp |
b5ebfe |
|
|
Karsten Hopp |
b5ebfe |
r = PyRun_String((char *)(cmd), Py_eval_input, globals, globals);
|
|
Karsten Hopp |
b5ebfe |
if (r == NULL)
|
|
Karsten Hopp |
b5ebfe |
+ {
|
|
Karsten Hopp |
b5ebfe |
+ if (PyErr_Occurred() && !msg_silent)
|
|
Karsten Hopp |
b5ebfe |
+ PyErr_PrintEx(0);
|
|
Karsten Hopp |
b5ebfe |
EMSG(_("E858: Eval did not return a valid python object"));
|
|
Karsten Hopp |
b5ebfe |
+ }
|
|
Karsten Hopp |
b5ebfe |
else
|
|
Karsten Hopp |
b5ebfe |
{
|
|
Karsten Hopp |
b5ebfe |
if (ConvertFromPyObject(r, rettv) == -1)
|
|
Karsten Hopp |
b5ebfe |
*** ../vim-7.3.824/src/version.c 2013-02-20 15:19:38.000000000 +0100
|
|
Karsten Hopp |
b5ebfe |
--- src/version.c 2013-02-20 15:27:20.000000000 +0100
|
|
Karsten Hopp |
b5ebfe |
***************
|
|
Karsten Hopp |
b5ebfe |
*** 727,728 ****
|
|
Karsten Hopp |
b5ebfe |
--- 727,730 ----
|
|
Karsten Hopp |
b5ebfe |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
b5ebfe |
+ /**/
|
|
Karsten Hopp |
b5ebfe |
+ 825,
|
|
Karsten Hopp |
b5ebfe |
/**/
|
|
Karsten Hopp |
b5ebfe |
|
|
Karsten Hopp |
b5ebfe |
--
|
|
Karsten Hopp |
b5ebfe |
ARTHUR: What are you going to do. bleed on me?
|
|
Karsten Hopp |
b5ebfe |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
b5ebfe |
|
|
Karsten Hopp |
b5ebfe |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
b5ebfe |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
b5ebfe |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
b5ebfe |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|