lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
508553a
To: vim-dev@vim.org
508553a
Subject: Patch 7.0.092
508553a
Fcc: outbox
508553a
From: Bram Moolenaar <Bram@moolenaar.net>
508553a
Mime-Version: 1.0
508553a
Content-Type: text/plain; charset=ISO-8859-1
508553a
Content-Transfer-Encoding: 8bit
508553a
------------
508553a
508553a
Patch 7.0.092 (after 7.0.082 and 7.0.084)
508553a
Problem:    The list of internal function arguments is obsolete now that
508553a
	    garbage collection is only done at the toplevel.
508553a
Solution:   Remove the list of all arguments to internal functions.
508553a
Files:	    src/eval.c
508553a
508553a
508553a
*** ../vim-7.0.091/src/eval.c	Wed Sep  6 22:14:42 2006
508553a
--- src/eval.c	Sat Sep  9 12:00:28 2006
508553a
***************
508553a
*** 248,264 ****
508553a
  };
508553a
  
508553a
  /*
508553a
-  * Struct used to make a list of all arguments used in internal functions.
508553a
-  */
508553a
- typedef struct av_list_item_S av_list_item_T;
508553a
- struct av_list_item_S {
508553a
-     av_list_item_T  *avl_next;
508553a
-     typval_T	    *avl_argvars;
508553a
- };
508553a
- 
508553a
- av_list_item_T *argvars_list = NULL;
508553a
- 
508553a
- /*
508553a
   * Info used by a ":for" loop.
508553a
   */
508553a
  typedef struct
508553a
--- 248,253 ----
508553a
***************
508553a
*** 6069,6075 ****
508553a
      int		i;
508553a
      funccall_T	*fc;
508553a
      int		did_free = FALSE;
508553a
-     av_list_item_T *av;
508553a
  #ifdef FEAT_WINDOWS
508553a
      tabpage_T	*tp;
508553a
  #endif
508553a
--- 6058,6063 ----
508553a
***************
508553a
*** 6110,6120 ****
508553a
  	set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID);
508553a
      }
508553a
  
508553a
-     /* arguments for internal functions */
508553a
-     for (av = argvars_list; av != NULL; av = av->avl_next)
508553a
- 	for (i = 0; av->avl_argvars[i].v_type != VAR_UNKNOWN; ++i)
508553a
- 	    set_ref_in_item(&av->avl_argvars[i], copyID);
508553a
- 
508553a
      /*
508553a
       * 2. Go through the list of dicts and free items without the copyID.
508553a
       */
508553a
--- 6098,6103 ----
508553a
***************
508553a
*** 7558,7578 ****
508553a
  		    error = ERROR_TOOMANY;
508553a
  		else
508553a
  		{
508553a
- 		    av_list_item_T  av_list_item;
508553a
- 
508553a
- 		    /* Add the arguments to the "argvars_list" to avoid the
508553a
- 		     * garbage collector not seeing them.  This isn't needed
508553a
- 		     * for user functions, because the arguments are available
508553a
- 		     * in the a: hashtab. */
508553a
- 		    av_list_item.avl_argvars = argvars;
508553a
- 		    av_list_item.avl_next = argvars_list;
508553a
- 		    argvars_list = &av_list_item;
508553a
- 
508553a
  		    argvars[argcount].v_type = VAR_UNKNOWN;
508553a
  		    functions[i].f_func(argvars, rettv);
508553a
  		    error = ERROR_NONE;
508553a
- 
508553a
- 		    argvars_list = av_list_item.avl_next;
508553a
  		}
508553a
  	    }
508553a
  	}
508553a
--- 7541,7549 ----
508553a
*** ../vim-7.0.091/src/version.c	Wed Sep  6 22:14:42 2006
508553a
--- src/version.c	Sat Sep  9 12:04:55 2006
508553a
***************
508553a
*** 668,669 ****
508553a
--- 668,671 ----
508553a
  {   /* Add new patch number below this line */
508553a
+ /**/
508553a
+     92,
508553a
  /**/
508553a
508553a
-- 
508553a
"Hegel was right when he said that we learn from history that man can
508553a
never learn anything from history."       (George Bernard Shaw)
508553a
508553a
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
508553a
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
508553a
\\\        download, build and distribute -- http://www.A-A-P.org        ///
508553a
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///