From f60d48740c16f600ddef273dd8dc7cad350aa753 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 26 Oct 2018 07:38:29 -0700 Subject: op: bugfix: sys:*op-ctx* defined too late. * share/txr/stdlib/op.tl (sys:*op-ctx*) Move definition before the make-struct-type call which instantiates the sys:op-ctx structure type, because the variable is referenced in that expression and treated as lexical. This situation now generates a warning. --- share/txr/stdlib/op.tl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/txr/stdlib/op.tl b/share/txr/stdlib/op.tl index b3b3a74b..d496249c 100644 --- a/share/txr/stdlib/op.tl +++ b/share/txr/stdlib/op.tl @@ -24,6 +24,8 @@ ;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(defvar sys:*op-ctx*) + (sys:make-struct-type 'sys:op-ctx nil nil '(form gens up meta) nil (lambda (me) @@ -31,8 +33,6 @@ (slotset me 'meta (gensym "meta-"))) nil nil) -(defvar sys:*op-ctx*) - (defun sys:ensure-op-arg (ctx n) (let ((ag (slot ctx 'gens))) (when (> n 1024) -- cgit v1.2.3