Changeset 8371


Ignore:
Timestamp:
01/19/05 14:56:49 (16 years ago)
Author:
piso
Message:

Fix for WITH-INPUT-FROM-STRING.22: don't update the index if the form exits abnormally.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/with-input-from-string.lisp

    r5642 r8371  
    11;;; with-input-from-string.lisp
    22;;;
    3 ;;; Copyright (C) 2004 Peter Graves
    4 ;;; $Id: with-input-from-string.lisp,v 1.2 2004-02-01 16:47:39 piso Exp $
     3;;; Copyright (C) 2004-2005 Peter Graves
     4;;; $Id: with-input-from-string.lisp,v 1.3 2005-01-19 14:56:49 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    4040       ,@decls
    4141       (unwind-protect
    42         (progn ,@forms)
    43         (close ,var)
    44         ,@(when index
    45             `((setf ,index (string-input-stream-current ,var))))))))
     42        (multiple-value-prog1
     43          (progn ,@forms)
     44          ,@(when index
     45              `((setf ,index (string-input-stream-current ,var)))))
     46        (close ,var)))))
Note: See TracChangeset for help on using the changeset viewer.