diff options
-rw-r--r-- | src/if_py_both.h | 3 | ||||
-rw-r--r-- | src/if_python.c | 3 | ||||
-rw-r--r-- | src/if_python3.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 11 insertions, 0 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index 48137f1e3..247fc9a08 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -6333,9 +6333,12 @@ init_structs(void) OutputType.tp_alloc = call_PyType_GenericAlloc; OutputType.tp_new = call_PyType_GenericNew; OutputType.tp_free = call_PyObject_Free; + OutputType.tp_base = &PyStdPrinter_Type; #else OutputType.tp_getattr = (getattrfunc)OutputGetattr; OutputType.tp_setattr = (setattrfunc)OutputSetattr; + // Disabled, because this causes a crash in test86 + // OutputType.tp_base = &PyFile_Type; #endif vim_memset(&IterType, 0, sizeof(IterType)); diff --git a/src/if_python.c b/src/if_python.c index 02e2cd79e..812497a7f 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -247,6 +247,7 @@ struct PyMethodDef { Py_ssize_t a; }; # define PySys_GetObject dll_PySys_GetObject # define PySys_SetArgv dll_PySys_SetArgv # define PyType_Type (*dll_PyType_Type) +# define PyFile_Type (*dll_PyFile_Type) # define PySlice_Type (*dll_PySlice_Type) # define PyType_Ready (*dll_PyType_Ready) # define PyType_GenericAlloc dll_PyType_GenericAlloc @@ -395,6 +396,7 @@ static int(*dll_PySys_SetObject)(char *, PyObject *); static PyObject *(*dll_PySys_GetObject)(char *); static int(*dll_PySys_SetArgv)(int, char **); static PyTypeObject* dll_PyType_Type; +static PyTypeObject* dll_PyFile_Type; static PyTypeObject* dll_PySlice_Type; static int (*dll_PyType_Ready)(PyTypeObject *type); static PyObject* (*dll_PyType_GenericAlloc)(PyTypeObject *type, PyInt nitems); @@ -580,6 +582,7 @@ static struct {"PySys_GetObject", (PYTHON_PROC*)&dll_PySys_GetObject}, {"PySys_SetArgv", (PYTHON_PROC*)&dll_PySys_SetArgv}, {"PyType_Type", (PYTHON_PROC*)&dll_PyType_Type}, + {"PyFile_Type", (PYTHON_PROC*)&dll_PyFile_Type}, {"PySlice_Type", (PYTHON_PROC*)&dll_PySlice_Type}, {"PyType_Ready", (PYTHON_PROC*)&dll_PyType_Ready}, {"PyType_GenericAlloc", (PYTHON_PROC*)&dll_PyType_GenericAlloc}, diff --git a/src/if_python3.c b/src/if_python3.c index 4360fe45c..f713f5623 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -231,6 +231,7 @@ typedef PySliceObject PySliceObject_T; # define PyFloat_AsDouble py3_PyFloat_AsDouble # define PyObject_GenericGetAttr py3_PyObject_GenericGetAttr # define PyType_Type (*py3_PyType_Type) +# define PyStdPrinter_Type (*py3_PyStdPrinter_Type) # define PySlice_Type (*py3_PySlice_Type) # define PyFloat_Type (*py3_PyFloat_Type) # define PyNumber_Check (*py3_PyNumber_Check) @@ -388,6 +389,7 @@ static PyObject* (*py3_PyObject_GenericGetAttr)(PyObject *obj, PyObject *name); 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_PyStdPrinter_Type; static PyTypeObject* py3_PySlice_Type; static PyTypeObject* py3_PyFloat_Type; static PyTypeObject* py3_PyBool_Type; @@ -548,6 +550,7 @@ static struct {"PyType_GenericAlloc", (PYTHON_PROC*)&py3_PyType_GenericAlloc}, {"PyType_GenericNew", (PYTHON_PROC*)&py3_PyType_GenericNew}, {"PyType_Type", (PYTHON_PROC*)&py3_PyType_Type}, + {"PyStdPrinter_Type", (PYTHON_PROC*)&py3_PyStdPrinter_Type}, {"PySlice_Type", (PYTHON_PROC*)&py3_PySlice_Type}, {"PyFloat_Type", (PYTHON_PROC*)&py3_PyFloat_Type}, {"PyBool_Type", (PYTHON_PROC*)&py3_PyBool_Type}, diff --git a/src/version.c b/src/version.c index 6a45c867f..0b35c4f4f 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1846, +/**/ 1845, /**/ 1844, |