diff options
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c index e6f672de254..e1809785410 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -4949,6 +4949,20 @@ load_comp_unit (struct Lisp_Native_Comp_Unit *comp_u, bool loading_dump, | |||
| 4949 | return res; | 4949 | return res; |
| 4950 | } | 4950 | } |
| 4951 | 4951 | ||
| 4952 | void | ||
| 4953 | unload_comp_unit (struct Lisp_Native_Comp_Unit *cu) | ||
| 4954 | { | ||
| 4955 | if (cu->handle == NULL) | ||
| 4956 | return; | ||
| 4957 | |||
| 4958 | Lisp_Object *saved_cu = dynlib_sym (cu->handle, COMP_UNIT_SYM); | ||
| 4959 | Lisp_Object this_cu; | ||
| 4960 | XSETNATIVE_COMP_UNIT (this_cu, cu); | ||
| 4961 | if (EQ (this_cu, *saved_cu)) | ||
| 4962 | *saved_cu = Qnil; | ||
| 4963 | dynlib_close (cu->handle); | ||
| 4964 | } | ||
| 4965 | |||
| 4952 | Lisp_Object | 4966 | Lisp_Object |
| 4953 | native_function_doc (Lisp_Object function) | 4967 | native_function_doc (Lisp_Object function) |
| 4954 | { | 4968 | { |