Changeset 14649


Ignore:
Timestamp:
Feb 8, 2011, 10:58:12 AM (14 years ago)
Author:
Gary Byers
Message:

Only one SHARED-LIBRARY-WITH-NAME; may not need extra arg after
Darwin-specific code is simplified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-cfm-support.lisp

    r14646 r14649  
    135135    (not (zerop count))))
    136136
    137 (defun shared-library-with-name (name)
     137(defun shared-library-with-name (name &optional (is-unloaded nil))
    138138  (let* ((namelen (length name)))
    139139    (dolist (lib *shared-libraries*)
    140140      (let* ((libname (shlib.soname lib)))
    141         (when (%simple-string= name libname 0 0 namelen (length libname))
     141        (when (and (%simple-string= name libname 0 0 namelen (length libname))
     142                   (or (not is-unloaded) (and (null (shlib.map lib))
     143                                              (null (shlib.base lib)))))
    142144          (return lib))))))
    143145
     
    373375      (return lib))))
    374376
    375 (defun shared-library-with-name (name &optional (is-unloaded nil))
    376   (let* ((namelen (length name)))
    377     (dolist (lib *shared-libraries*)
    378       (let* ((libname (shlib.soname lib)))
    379         (when (and (%simple-string= name libname 0 0 namelen (length libname))
    380                    (or (not is-unloaded) (and (null (shlib.map lib))
    381                                               (null (shlib.base lib)))))
    382           (return lib))))))
     377
    383378
    384379;;;   
     
    10301025          (open-shared-library-internal name)
    10311026         
    1032           (call-in-process (lambda () (open-shared-library-internal  name))
     1027          (call-in-process (lambda ()
     1028                             (handler-case (open-shared-library-internal  name)
     1029                               (error (condition) (values nil (format nil "~a" condition)))))
     1030                                                                     
     1031                             
    10331032                           (if (eq process :initial)
    10341033                             *initial-process*
Note: See TracChangeset for help on using the changeset viewer.