1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00

* boot-9.scm (warn-autoload-deprecation): New function.

(init-dynamic-module): Use it here to print warning.  Only give
warning when a module has actually been found.
This commit is contained in:
Marius Vollmer 2001-03-26 22:31:47 +00:00
parent 72f1168d63
commit a4e7b79a5e

View file

@ -1811,12 +1811,23 @@
(append! (convert-c-registered-modules dynobj)
registered-modules)))
(define (warn-autoload-deprecation modname)
(display
";;; Autoloading of compiled code modules is deprecated.\n"
(current-error-port))
(display
";;; Write a Scheme file instead that uses `dynamic-link' directly.\n"
(current-error-port))
(format (current-error-port)
";;; (You just tried to autoload module ~S.\n" modname))
(define (init-dynamic-module modname)
;; Register any linked modules which has been registered on the C level
(register-modules #f)
(or-map (lambda (modinfo)
(if (equal? (car modinfo) modname)
(begin
(warn-autload-deprecation modname)
(set! registered-modules (delq! modinfo registered-modules))
(let ((mod (resolve-module modname #f)))
(save-module-excursion