From b3f82e51e60b9378ed8a0d68254ccf525f96a573 Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Wed, 10 Sep 2008 19:32:48 +0000 Subject: [PATCH] Fix compilation of non-expression data files, broken by the recent change to non-file scode compilation. --- v7/src/compiler/machines/C/cout.scm | 10 +++++----- v7/src/compiler/machines/C/ctop.scm | 8 ++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/v7/src/compiler/machines/C/cout.scm b/v7/src/compiler/machines/C/cout.scm index ca427b92d..f09d42b72 100644 --- a/v7/src/compiler/machines/C/cout.scm +++ b/v7/src/compiler/machines/C/cout.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: cout.scm,v 1.46 2008/09/10 15:12:07 riastradh Exp $ +$Id: cout.scm,v 1.47 2008/09/10 19:32:48 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -53,12 +53,12 @@ USA. (define *subblocks*) ;referenced by stackify -(define (stringify-data object output-pathname) +(define (stringify-data object) (if (not *use-stackify?*) - (stringify-data/traditional object output-pathname) - (stringify-data/stackify object output-pathname))) + (stringify-data/traditional object) + (stringify-data/stackify object))) -(define (stringify-data/stackify object output-pathname) +(define (stringify-data/stackify object) (let* ((str (stackify 0 object)) (handle (default-file-handle)) (data-name diff --git a/v7/src/compiler/machines/C/ctop.scm b/v7/src/compiler/machines/C/ctop.scm index 5eb8296ba..515c2ca96 100644 --- a/v7/src/compiler/machines/C/ctop.scm +++ b/v7/src/compiler/machines/C/ctop.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: ctop.scm,v 1.33 2008/09/10 15:12:07 riastradh Exp $ +$Id: ctop.scm,v 1.34 2008/09/10 19:32:48 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -47,7 +47,11 @@ USA. (pathname-new-type pathname (c-output-extension)))))) (define (compile-data-from-file object pathname) - (let ((result (stringify-data object (merge-pathnames pathname)))) + (let ((result + (fluid-let ((*compiler-file-handle* + (file-namestring + (pathname-new-type pathname (c-output-extension))))) + (stringify-data object)))) ;; Make output palatable to compiler-file-output (vector #f (cons #f result)))) -- 2.25.1