Skip to content

Commit

Permalink
Remove %load-extension-library
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Dec 8, 2024
1 parent f9f047d commit 9587d96
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions src/lisp/kernel/lsp/fli.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,14 @@
(declare (ignore name))
(multiple-value-bind (handle error)
(%dlopen path)
(if (not handle)
(error "~A" error)
handle)))
(cond ((not handle)
(error "~A" error))
(t
(gctools:register-loaded-objects)
(let ((ptr (%foreign-symbol-pointer "startup_clasp_extension" handle)))
(when ptr
(%foreign-funcall-pointer ptr :void)))
handle))))

(declaim (inline %close-foreign-library))
(defun %close-foreign-library (ptr)
Expand Down Expand Up @@ -387,19 +392,6 @@
"Return a pointer (of type ForeignData_sp / FOREIGN_DATA to a foreign symbol."
(%dlsym (or module :rtld-default) name))

;;; === FOREIGN EXTENSIONS ===

(defun %load-extension-library (name path)
"Load an extension library to be found at path. (name is ignored)"
(multiple-value-bind (handle error)
(%dlopen path)
(unless handle
(error "~A" error))
(gctools:register-loaded-objects)
(let ((ptr (%foreign-symbol-pointer "startup_clasp_extension" handle)))
(%foreign-funcall-pointer ptr :void))
handle))

;;;----------------------------------------------------------------------------
;;;
;;; F L I I N I T I A L I Z A T I O N
Expand Down Expand Up @@ -544,7 +536,6 @@
%foreign-funcall
%foreign-funcall-pointer
%load-foreign-library
%load-extension-library
%close-foreign-library
%foreign-symbol-pointer
%foreign-type-size
Expand Down

0 comments on commit 9587d96

Please sign in to comment.