src/module-impl.lisp: Don't require `finalize-module' to return the module.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 23 Sep 2015 09:00:47 +0000 (10:00 +0100)
Returning the correct module object is now the responsibility of
`build-module'.

src/module-impl.lisp

index c15edda..0bf9ff2 100644 (file)
@@ -51,8 +51,7 @@
     ;; exercise the property-set fiddling in `shared-initialize' and we can
     ;; catch unknown-property errors.
     (change-class module class :state t :pset pset)
-    (check-unused-properties pset)
-    module))
+    (check-unused-properties pset)))
 
 ;;;--------------------------------------------------------------------------
 ;;; Module objects.
@@ -87,7 +86,8 @@
         (with-module-environment ()
           (module-import *builtin-module*)
           (funcall thunk)
-          (finalize-module *module*))
+          (finalize-module *module*)
+          *module*)
       (when (and truename (not (eq (module-state *module*) t)))
        (remhash truename *module-map*)))))