Mercurial > vim
comparison src/if_tcl.c @ 29272:8175cd4c8fdd v8.2.5154
patch 8.2.5154: still mentioning version8, some cosmetic issues
Commit: https://github.com/vim/vim/commit/abd56da30bae4a5c6c20b9363ccae12f7b126026
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 23 20:46:27 2022 +0100
patch 8.2.5154: still mentioning version8, some cosmetic issues
Problem: Still mentioning version8, some cosmetic issues.
Solution: Prefer mentioning version9, cosmetic improvements.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 23 Jun 2022 22:00:04 +0200 |
parents | 4dcccb2673fe |
children | e134ff00be57 |
comparison
equal
deleted
inserted
replaced
29271:723cbd2896aa | 29272:8175cd4c8fdd |
---|---|
219 return FAIL; | 219 return FAIL; |
220 } | 220 } |
221 for (i = 0; tcl_funcname_table[i].ptr; ++i) | 221 for (i = 0; tcl_funcname_table[i].ptr; ++i) |
222 { | 222 { |
223 if (!(*tcl_funcname_table[i].ptr = symbol_from_dll(hTclLib, | 223 if (!(*tcl_funcname_table[i].ptr = symbol_from_dll(hTclLib, |
224 tcl_funcname_table[i].name))) | 224 tcl_funcname_table[i].name))) |
225 { | 225 { |
226 close_dll(hTclLib); | 226 close_dll(hTclLib); |
227 hTclLib = NULL; | 227 hTclLib = NULL; |
228 if (verbose) | 228 if (verbose) |
229 semsg(_(e_could_not_load_library_function_str), tcl_funcname_table[i].name); | 229 semsg(_(e_could_not_load_library_function_str), |
230 tcl_funcname_table[i].name); | |
230 return FAIL; | 231 return FAIL; |
231 } | 232 } |
232 } | 233 } |
233 return OK; | 234 return OK; |
234 } | 235 } |
261 if (!stubs_initialized && find_executable_arg != NULL | 262 if (!stubs_initialized && find_executable_arg != NULL |
262 && tcl_runtime_link_init((char *)p_tcldll, verbose) == OK) | 263 && tcl_runtime_link_init((char *)p_tcldll, verbose) == OK) |
263 { | 264 { |
264 Tcl_Interp *interp; | 265 Tcl_Interp *interp; |
265 | 266 |
267 // Note: the library will allocate memory to store the executable name, | |
268 // which will be reported as possibly leaked by valgrind. | |
266 dll_Tcl_FindExecutable(find_executable_arg); | 269 dll_Tcl_FindExecutable(find_executable_arg); |
267 | 270 |
268 if ((interp = dll_Tcl_CreateInterp()) != NULL) | 271 if ((interp = dll_Tcl_CreateInterp()) != NULL) |
269 { | 272 { |
270 if (Tcl_InitStubs(interp, DYNAMIC_TCL_VER, 0)) | 273 if (Tcl_InitStubs(interp, DYNAMIC_TCL_VER, 0) != NULL) |
271 { | 274 { |
272 Tcl_DeleteInterp(interp); | 275 Tcl_DeleteInterp(interp); |
273 stubs_initialized = TRUE; | 276 stubs_initialized = TRUE; |
274 } | 277 } |
275 // FIXME: When Tcl_InitStubs() was failed, how delete interp? | 278 // FIXME: When Tcl_InitStubs() was failed, how delete interp? |
278 return stubs_initialized; | 281 return stubs_initialized; |
279 } | 282 } |
280 #endif | 283 #endif |
281 | 284 |
282 #if defined(EXITFREE) || defined(PROTO) | 285 #if defined(EXITFREE) || defined(PROTO) |
286 /* | |
287 * Called once when exiting. | |
288 */ | |
283 void | 289 void |
284 vim_tcl_finalize(void) | 290 vim_tcl_finalize(void) |
285 { | 291 { |
286 # ifdef DYNAMIC_TCL | 292 # ifdef DYNAMIC_TCL |
287 if (stubs_initialized) | 293 if (stubs_initialized) |