1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-01 01:40:21 +02:00

(try-load-module): Bracket calls to try-module-linked

and try-module-dynamic-link with `begin-deprecated'.
(split-c-module-name, convert-c-registered-modules,
registered-modules, register-modules, warn-autoload-deprecation,
init-dynamic-module, dynamic-maybe-call, dynamic-maybe-link,
find-and-link-dynamic-module, try-using-libtool-name,
try-using-sharlib-name, link-dynamic-module, try-module-linked,
try-module-dynamic-link): Deprecated.  Activate deprecation
message.
This commit is contained in:
Marius Vollmer 2001-06-03 01:02:53 +00:00
parent 691f5a4d2d
commit 99a34d6e6a

View file

@ -1610,9 +1610,9 @@
;; (define-special-value '(app modules new-ws) (lambda () (make-scm-module))) ;; (define-special-value '(app modules new-ws) (lambda () (make-scm-module)))
(define (try-load-module name) (define (try-load-module name)
(or (try-module-linked name) (or (begin-deprecated (try-module-linked name))
(try-module-autoload name) (try-module-autoload name)
(try-module-dynamic-link name))) (begin-deprecated (try-module-dynamic-link name))))
(define (purify-module! module) (define (purify-module! module)
"Removes bindings in MODULE which are inherited from the (guile) module." "Removes bindings in MODULE which are inherited from the (guile) module."
@ -1803,11 +1803,9 @@
;;; Dynamic linking of modules ;;; Dynamic linking of modules
;; This method of dynamically linking Guile Extensions is deprecated. ;; This method of dynamically linking Guile Extensions is deprecated.
;; Use `dynamic-link' and `dynamic-call' explicitely from Scheme code ;; Use `load-extension' explicitely from Scheme code instead.
;; instead.
;; XXX - We can not offer the removal of this code thru the (begin-deprecated
;; deprecation mechanism since we have no complete replacement yet.
(define (split-c-module-name str) (define (split-c-module-name str)
(let loop ((rev '()) (let loop ((rev '())
@ -1840,11 +1838,11 @@
registered-modules))) registered-modules)))
(define (warn-autoload-deprecation modname) (define (warn-autoload-deprecation modname)
;; Do nothing here until we can deprecate the code for real.
(if #f
(issue-deprecation-warning (issue-deprecation-warning
"Autoloading of compiled code modules is deprecated." "Autoloading of compiled code modules is deprecated."
"Write a Scheme file instead that uses `dynamic-link' directly."))) "Write a Scheme file instead that uses `load-extension'.")
(issue-deprecation-warning
(simple-format #f "(You just autoloaded module ~S.)" modname)))
(define (init-dynamic-module modname) (define (init-dynamic-module modname)
;; Register any linked modules which have been registered on the C level ;; Register any linked modules which have been registered on the C level
@ -1935,7 +1933,7 @@
(in-vicinity libdir (string-append libname ".so"))) (in-vicinity libdir (string-append libname ".so")))
(define (link-dynamic-module filename initname) (define (link-dynamic-module filename initname)
;; Register any linked modules which has been registered on the C level ;; Register any linked modules which have been registered on the C level
(register-modules #f) (register-modules #f)
(let ((dynobj (dynamic-link filename))) (let ((dynobj (dynamic-link filename)))
(dynamic-call initname dynobj) (dynamic-call initname dynobj)
@ -1946,8 +1944,8 @@
(define (try-module-dynamic-link module-name) (define (try-module-dynamic-link module-name)
(and (find-and-link-dynamic-module module-name) (and (find-and-link-dynamic-module module-name)
(init-dynamic-module module-name))) (init-dynamic-module module-name))))
;; end of deprecated section
(define autoloads-done '((guile . guile))) (define autoloads-done '((guile . guile)))