Skip to content

Commit 2027973

Browse files
committed
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.
1 parent 5908fdf commit 2027973

7 files changed

Lines changed: 3 additions & 75 deletions

File tree

src/if_lua.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -398,16 +398,6 @@ static const luaV_Reg luaV_dll[] = {
398398

399399
static HANDLE hinstLua = NULL;
400400

401-
static void
402-
end_dynamic_lua(void)
403-
{
404-
if (hinstLua)
405-
{
406-
close_dll(hinstLua);
407-
hinstLua = 0;
408-
}
409-
}
410-
411401
static int
412402
lua_link_init(char *libname, int verbose)
413403
{
@@ -2121,9 +2111,6 @@ lua_end(void)
21212111
{
21222112
lua_close(L);
21232113
L = NULL;
2124-
#ifdef DYNAMIC_LUA
2125-
end_dynamic_lua();
2126-
#endif
21272114
}
21282115
}
21292116

src/if_perl.xs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ perl_init(void)
762762
}
763763

764764
/*
765-
* perl_end(): clean up after ourselves
765+
* Clean up after ourselves.
766766
*/
767767
void
768768
perl_end(void)
@@ -777,13 +777,6 @@ perl_end(void)
777777
Perl_sys_term();
778778
#endif
779779
}
780-
#ifdef DYNAMIC_PERL
781-
if (hPerlLib)
782-
{
783-
close_dll(hPerlLib);
784-
hPerlLib = NULL;
785-
}
786-
#endif
787780
}
788781

789782
/*

src/if_python.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -654,19 +654,6 @@ static struct
654654
{"", NULL},
655655
};
656656

657-
/*
658-
* Free python.dll
659-
*/
660-
static void
661-
end_dynamic_python(void)
662-
{
663-
if (hinstPython)
664-
{
665-
close_dll(hinstPython);
666-
hinstPython = 0;
667-
}
668-
}
669-
670657
/*
671658
* Load library and get all pointers.
672659
* Parameter 'libname' provides name of DLL.
@@ -889,7 +876,6 @@ python_end(void)
889876
# endif
890877
Py_Finalize();
891878
}
892-
end_dynamic_python();
893879
#else
894880
if (Py_IsInitialized())
895881
{

src/if_python3.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -634,19 +634,6 @@ py3__Py_XDECREF(PyObject *op)
634634
# define Py_XDECREF(op) py3__Py_XDECREF(_PyObject_CAST(op))
635635
# endif
636636

637-
/*
638-
* Free python.dll
639-
*/
640-
static void
641-
end_dynamic_python3(void)
642-
{
643-
if (hinstPy3 != 0)
644-
{
645-
close_dll(hinstPy3);
646-
hinstPy3 = 0;
647-
}
648-
}
649-
650637
/*
651638
* Load library and get all pointers.
652639
* Parameter 'libname' provides name of DLL.
@@ -873,10 +860,6 @@ python3_end(void)
873860
Py_Finalize();
874861
}
875862

876-
#ifdef DYNAMIC_PYTHON3
877-
end_dynamic_python3();
878-
#endif
879-
880863
--recurse;
881864
}
882865

src/if_ruby.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -735,19 +735,6 @@ static struct
735735
{"", NULL},
736736
};
737737

738-
/*
739-
* Free ruby.dll
740-
*/
741-
static void
742-
end_dynamic_ruby(void)
743-
{
744-
if (hinstRuby)
745-
{
746-
close_dll(hinstRuby);
747-
hinstRuby = NULL;
748-
}
749-
}
750-
751738
/*
752739
* Load library and get all pointers.
753740
* Parameter 'libname' provides name of DLL.
@@ -797,9 +784,6 @@ ruby_enabled(int verbose)
797784
void
798785
ruby_end(void)
799786
{
800-
#ifdef DYNAMIC_RUBY
801-
end_dynamic_ruby();
802-
#endif
803787
}
804788

805789
void

src/if_tcl.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,6 @@ tcl_enabled(int verbose)
280280
void
281281
tcl_end(void)
282282
{
283-
#ifdef DYNAMIC_TCL
284-
if (hTclLib)
285-
{
286-
close_dll(hTclLib);
287-
hTclLib = NULL;
288-
}
289-
#endif
290283
}
291284

292285
/////////////////////////////////////////////////////////////////////////////

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
479,
741743
/**/
742744
478,
743745
/**/

0 commit comments

Comments
 (0)