Boxu Zhang wrote:
> Hi Vims,
> I've fixed a crash when using vim-lldb plugin. You can view the reason
> here: https://github.com/boxu-zhang/vim
> The patch file is attched. Also you can view the patch on github:
> https://github.com/boxu-zhang/vim/commit/8752085132dcf2a44a5554ba1334d4687b555e79
Thanks for diving into this and finding a solution.
It doesn't work for Python 3, but it's easy to guess from the Python 2
changes how to do it for Python 3:
--- ../../git/vim80/src/if_python3.c 2018-01-31 21:48:25.236668741 +0100
+++ if_python3.c 2018-03-18 14:55:45.279603601 +0100
@@ -236,6 +231,7 @@
# define PyFloat_AsDouble py3_PyFloat_AsDouble
# define PyObject_GenericGetAttr py3_PyObject_GenericGetAttr
# define PyType_Type (*py3_PyType_Type)
+# define PyFile_Type (*py3_PyFile_Type)
# define PySlice_Type (*py3_PySlice_Type)
# define PyFloat_Type (*py3_PyFloat_Type)
# define PyNumber_Check (*py3_PyNumber_Check)
@@ -393,6 +389,7 @@
static PyObject* (*py3_PyType_GenericAlloc)(PyTypeObject *type, Py_ssize_t
nitems);
static PyObject* (*py3_PyType_GenericNew)(PyTypeObject *type, PyObject *args,
PyObject *kwds);
static PyTypeObject* py3_PyType_Type;
+static PyTypeObject* py3_PyFile_Type;
static PyTypeObject* py3_PySlice_Type;
static PyTypeObject* py3_PyFloat_Type;
static PyTypeObject* py3_PyBool_Type;
@@ -553,6 +550,7 @@
{"PyType_GenericAlloc", (PYTHON_PROC*)&py3_PyType_GenericAlloc},
{"PyType_GenericNew", (PYTHON_PROC*)&py3_PyType_GenericNew},
{"PyType_Type", (PYTHON_PROC*)&py3_PyType_Type},
+ {"PyFile_Type", (PYTHON_PROC*)&py3_PyFile_Type},
{"PySlice_Type", (PYTHON_PROC*)&py3_PySlice_Type},
{"PyFloat_Type", (PYTHON_PROC*)&py3_PyFloat_Type},
{"PyBool_Type", (PYTHON_PROC*)&py3_PyBool_Type},
Unfortunatley, after including this patch test 86 fails with a SEGV.
Can you reproduct that?
--
How To Keep A Healthy Level Of Insanity:
14. Put mosquito netting around your work area. Play a tape of jungle
sounds all day.
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.