changeset 4611:49f0fcd9762c v7.3.1053

updated for version 7.3.1053 Problem: Python: no flag for types with tp_traverse+tp_clear. Solution: Python patch 14: Add Py_TPFLAGS_HAVE_GC. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Wed, 29 May 2013 22:58:32 +0200
parents 42d4b7fe71f1
children 44ca4bc7d747
files src/if_py_both.h src/version.c
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -4461,7 +4461,7 @@ init_structs(void)
     vim_memset(&IterType, 0, sizeof(IterType));
     IterType.tp_name = "vim.iter";
     IterType.tp_basicsize = sizeof(IterObject);
-    IterType.tp_flags = Py_TPFLAGS_DEFAULT;
+    IterType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
     IterType.tp_doc = "generic iterator object";
     IterType.tp_iter = (getiterfunc)IterIter;
     IterType.tp_iternext = (iternextfunc)IterNext;
@@ -4495,7 +4495,7 @@ init_structs(void)
     WindowType.tp_basicsize = sizeof(WindowObject);
     WindowType.tp_dealloc = (destructor)WindowDestructor;
     WindowType.tp_repr = (reprfunc)WindowRepr;
-    WindowType.tp_flags = Py_TPFLAGS_DEFAULT;
+    WindowType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
     WindowType.tp_doc = "vim Window object";
     WindowType.tp_methods = WindowMethods;
     WindowType.tp_traverse = (traverseproc)WindowTraverse;
@@ -4558,7 +4558,7 @@ init_structs(void)
     RangeType.tp_repr = (reprfunc)RangeRepr;
     RangeType.tp_as_sequence = &RangeAsSeq;
     RangeType.tp_as_mapping = &RangeAsMapping;
-    RangeType.tp_flags = Py_TPFLAGS_DEFAULT;
+    RangeType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
     RangeType.tp_doc = "vim Range object";
     RangeType.tp_methods = RangeMethods;
     RangeType.tp_traverse = (traverseproc)RangeTraverse;
@@ -4637,7 +4637,7 @@ init_structs(void)
     vim_memset(&OptionsType, 0, sizeof(OptionsType));
     OptionsType.tp_name = "vim.options";
     OptionsType.tp_basicsize = sizeof(OptionsObject);
-    OptionsType.tp_flags = Py_TPFLAGS_DEFAULT;
+    OptionsType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
     OptionsType.tp_doc = "object for manipulating options";
     OptionsType.tp_as_mapping = &OptionsAsMapping;
     OptionsType.tp_dealloc = (destructor)OptionsDestructor;
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1053,
+/**/
     1052,
 /**/
     1051,