* boot-9.scm (warn-autoload-deprecation): New function.
authorMarius Vollmer <mvo@zagadka.de>
Mon, 26 Mar 2001 22:31:47 +0000 (22:31 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Mon, 26 Mar 2001 22:31:47 +0000 (22:31 +0000)
(init-dynamic-module): Use it here to print warning.  Only give
warning when a module has actually been found.

ice-9/boot-9.scm

index a1ac4d1..e96defa 100644 (file)
        (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