updated for version 7.4.609
Problem: For complicated list and dict use the garbage collector can run
out of stack space.
Solution: Use a stack of dicts and lists to be marked, thus making it
iterative instead of recursive. (Ben Fritz)
diff --git a/src/proto/eval.pro b/src/proto/eval.pro
index b264365..30416fb 100644
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -62,9 +62,9 @@
void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item));
void vimlist_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
int garbage_collect __ARGS((void));
-void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID));
-void set_ref_in_list __ARGS((list_T *l, int copyID));
-void set_ref_in_item __ARGS((typval_T *tv, int copyID));
+int set_ref_in_ht __ARGS((hashtab_T *ht, int copyID, list_stack_T **list_stack));
+int set_ref_in_list __ARGS((list_T *l, int copyID, ht_stack_T **ht_stack));
+int set_ref_in_item __ARGS((typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack));
dict_T *dict_alloc __ARGS((void));
void dict_unref __ARGS((dict_T *d));
void dict_free __ARGS((dict_T *d, int recurse));
diff --git a/src/proto/if_lua.pro b/src/proto/if_lua.pro
index 8db66a6..10395d5 100644
--- a/src/proto/if_lua.pro
+++ b/src/proto/if_lua.pro
@@ -7,5 +7,5 @@
void lua_buffer_free __ARGS((buf_T *buf));
void lua_window_free __ARGS((win_T *win));
void do_luaeval __ARGS((char_u *str, typval_T *arg, typval_T *rettv));
-void set_ref_in_lua __ARGS((int copyID));
+int set_ref_in_lua __ARGS((int copyID));
/* vim: set ft=c : */
diff --git a/src/proto/if_python.pro b/src/proto/if_python.pro
index 369a5d8..be206e4 100644
--- a/src/proto/if_python.pro
+++ b/src/proto/if_python.pro
@@ -9,5 +9,5 @@
void python_window_free __ARGS((win_T *win));
void python_tabpage_free __ARGS((tabpage_T *tab));
void do_pyeval __ARGS((char_u *str, typval_T *rettv));
-void set_ref_in_python __ARGS((int copyID));
+int set_ref_in_python __ARGS((int copyID));
/* vim: set ft=c : */
diff --git a/src/proto/if_python3.pro b/src/proto/if_python3.pro
index 1e2a522..8d0489c 100644
--- a/src/proto/if_python3.pro
+++ b/src/proto/if_python3.pro
@@ -9,5 +9,5 @@
void python3_window_free __ARGS((win_T *win));
void python3_tabpage_free __ARGS((tabpage_T *tab));
void do_py3eval __ARGS((char_u *str, typval_T *rettv));
-void set_ref_in_python3 __ARGS((int copyID));
+int set_ref_in_python3 __ARGS((int copyID));
/* vim: set ft=c : */