X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/7f2917d28642cfbdf590ff26f0cdd91a79b1c489..f6eafb24c6798b8c68fa00b08814ddf57a0f630c:/src/module-impl.lisp?ds=sidebyside diff --git a/src/module-impl.lisp b/src/module-impl.lisp index 1e1f662..206b5e6 100644 --- a/src/module-impl.lisp +++ b/src/module-impl.lisp @@ -7,7 +7,7 @@ ;;;----- Licensing notice --------------------------------------------------- ;;; -;;; This file is part of the Sensble Object Design, an object system for C. +;;; This file is part of the Sensible Object Design, an object system for C. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -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*))))) @@ -207,24 +207,6 @@ (:documentation "A plain fragment of C to be dropped in at top-level.")) -(defmacro define-fragment ((reason name) &body things) - (categorize (thing things) - ((constraints (listp thing)) - (frags (typep thing '(or string c-fragment)))) - (when (null frags) - (error "Missing code fragment")) - (when (cdr frags) - (error "Multiple code fragments")) - `(add-to-module - *module* - (make-instance 'code-fragment-item - :fragment ',(car frags) - :name ,name - :reason ,reason - :constraints (list ,@(mapcar (lambda (constraint) - (cons 'list constraint)) - constraints)))))) - ;;;-------------------------------------------------------------------------- ;;; File searching.