Comment 2 for bug 905840

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

Proposed shared object API extensions:

(defun map-shared-objects (function)
  "Calls FUNCTION with two values for each shared object loaded: \(1) PATHNAME
argument used to load it -- and usable with UNLOAD-SHARED-OBJECT to unload it.
\(2) A boolean designating if the shared object will be retained when the core
is saved, ie. false if :DONT-SAVE T was passed to LOAD-SHARED-OBJECT earlier."
  ...)

(defun rename-shared-object (old-pathname new-pathname)
  #!+sb-doc
  "Changes the pathname associated with a shared object from OLD-PATHNAME to NEW-PATHNAME:
when the core is saved and later restarted, NEW-PATHNAME is used to try to reload
the shared object instead of the OLD-PATHNAME. Signals an error if OLD-PATHNAME is not
associated with a shared object."
  ...)

I think these should be enough to cover most cases we're interested in, and seems easier than exposing internal objects sanely.