From 6c3c2dd3e236da72ce43b923e4eeac7d33eb5cbd Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 27 Jul 2019 01:00:40 +0100 Subject: [PATCH] src/module-{proto,impl}.lisp: Publish fragments properly. Not sure why this was languishing in `module-impl.lisp'. --- doc/SYMBOLS | 4 ++-- src/module-impl.lisp | 10 ---------- src/module-proto.lisp | 13 +++++++++++++ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/doc/SYMBOLS b/doc/SYMBOLS index 4b3c490..102b013 100644 --- a/doc/SYMBOLS +++ b/doc/SYMBOLS @@ -557,8 +557,6 @@ method-proto.lisp module-impl.lisp *module-dirs* variable - c-fragment class - c-fragment-text generic code-fragment generic code-fragment-constraints generic code-fragment-item class @@ -584,6 +582,8 @@ module-proto.lisp add-clear-the-decks-function function add-module-binding function add-to-module generic + c-fragment class + c-fragment-text generic clear-the-decks function define-clear-the-decks macro define-module macro diff --git a/src/module-impl.lisp b/src/module-impl.lisp index 4da7804..268f4bc 100644 --- a/src/module-impl.lisp +++ b/src/module-impl.lisp @@ -152,16 +152,6 @@ ;;;-------------------------------------------------------------------------- ;;; Code fragments. -(export '(c-fragment c-fragment-text)) -(defclass c-fragment () - ((location :initarg :location :type file-location :reader file-location) - (text :initarg :text :type string :reader c-fragment-text)) - (:documentation - "Represents a fragment of C code to be written to an output file. - - A C fragment is aware of its original location, and will bear proper - `#line' markers when written out.")) - (defun output-c-excursion (stream location func) "Invoke FUNC surrounding it by writing #line markers to STREAM. diff --git a/src/module-proto.lisp b/src/module-proto.lisp index 7e42a5b..b0be8dd 100644 --- a/src/module-proto.lisp +++ b/src/module-proto.lisp @@ -224,4 +224,17 @@ "Evaluate BODY within the context of a temporary module." `(call-with-temporary-module (lambda () ,@body))) +;;;-------------------------------------------------------------------------- +;;; Code fragments. + +(export '(c-fragment c-fragment-text)) +(defclass c-fragment () + ((location :initarg :location :type file-location :reader file-location) + (text :initarg :text :type string :reader c-fragment-text)) + (:documentation + "Represents a fragment of C code to be written to an output file. + + A C fragment is aware of its original location, and will bear proper + `#line' markers when written out.")) + ;;;----- That's all, folks -------------------------------------------------- -- 2.11.0