comparison src/if_lua.c @ 19846:4acb165ed0bc v8.2.0479

patch 8.2.0479: unloading shared libraries on exit has no purpose Commit: https://github.com/vim/vim/commit/2027973b5be693577bea0731b50ea4904d19ea8b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 29 20:51:07 2020 +0200 patch 8.2.0479: unloading shared libraries on exit has no purpose Problem: Unloading shared libraries on exit has no purpose. Solution: Do not unload shared libraries on exit.
author Bram Moolenaar <Bram@vim.org>
date Sun, 29 Mar 2020 21:00:03 +0200
parents 967149bbd8d3
children 86dde5c4b375
comparison
equal deleted inserted replaced
19845:32787925de3c 19846:4acb165ed0bc
395 {"luaL_openlibs", (luaV_function) &dll_luaL_openlibs}, 395 {"luaL_openlibs", (luaV_function) &dll_luaL_openlibs},
396 {NULL, NULL} 396 {NULL, NULL}
397 }; 397 };
398 398
399 static HANDLE hinstLua = NULL; 399 static HANDLE hinstLua = NULL;
400
401 static void
402 end_dynamic_lua(void)
403 {
404 if (hinstLua)
405 {
406 close_dll(hinstLua);
407 hinstLua = 0;
408 }
409 }
410 400
411 static int 401 static int
412 lua_link_init(char *libname, int verbose) 402 lua_link_init(char *libname, int verbose)
413 { 403 {
414 const luaV_Reg *reg; 404 const luaV_Reg *reg;
2119 { 2109 {
2120 if (lua_isopen()) 2110 if (lua_isopen())
2121 { 2111 {
2122 lua_close(L); 2112 lua_close(L);
2123 L = NULL; 2113 L = NULL;
2124 #ifdef DYNAMIC_LUA
2125 end_dynamic_lua();
2126 #endif
2127 } 2114 }
2128 } 2115 }
2129 2116
2130 /* 2117 /*
2131 * ex commands 2118 * ex commands