To: vim-dev@vim.org
Subject: Patch 6.0.093
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 6.0.093
Problem:    When the Tcl library couldn't be loaded dynamically, get an error
            message when closing a buffer or window. (Muraoka Taro)
Solution:   Only free structures if already using the Tcl interpreter.
Files:      src/if_tcl.c


*** ../vim60.92/src/if_tcl.c	Sun Nov  4 14:31:23 2001
--- src/if_tcl.c	Tue Nov  6 11:39:23 2001
***************
*** 228,233 ****
--- 228,236 ----
  }
  
  #if defined(DYNAMIC_TCL) || defined(PROTO)
+ 
+ static int stubs_initialized = FALSE;
+ 
  /*
   * Return TRUE if the TCL interface can be used.
   */
***************
*** 235,242 ****
  tcl_enabled(verbose)
      int		verbose;
  {
-     static int stubs_initialized = FALSE;
- 
      if (!stubs_initialized && find_executable_arg != NULL
  	    && tcl_runtime_link_init(DYNAMIC_TCL_DLL, verbose) == OK)
      {
--- 238,243 ----
***************
*** 2079,2085 ****
      struct ref *reflist;
  
  #ifdef DYNAMIC_TCL
!     if (!tcl_enabled(TRUE))
  	return;
  #endif
  
--- 2080,2086 ----
      struct ref *reflist;
  
  #ifdef DYNAMIC_TCL
!     if (!stubs_initialized)	/* Not using Tcl, nothing to do. */
  	return;
  #endif
  
***************
*** 2100,2106 ****
      struct ref *reflist;
  
  #ifdef DYNAMIC_TCL
!     if (!tcl_enabled(TRUE))
  	return;
  #endif
  
--- 2101,2107 ----
      struct ref *reflist;
  
  #ifdef DYNAMIC_TCL
!     if (!stubs_initialized)	/* Not using Tcl, nothing to do. */
  	return;
  #endif
  
*** ../vim60.92/src/version.c	Tue Nov  6 22:02:12 2001
--- src/version.c	Tue Nov  6 22:03:56 2001
***************
*** 608,609 ****
--- 608,611 ----
  {   /* Add new patch number below this line */
+ /**/
+     93,
  /**/

-- 
How To Keep A Healthy Level Of Insanity:
6. In the memo field of all your checks, write "for sexual favors".

 ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
(((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
 \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///