Changeset 8967


Ignore:
Timestamp:
Mar 30, 2008, 11:13:47 PM (11 years ago)
Author:
gb
Message:

CHECK-TYPE: don't store unconditionally. (We aren't going to be able
to fit on a floppy anymore if this keeps up ...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lib/macros.lisp

    r8889 r8967  
    26342634
    26352635(defmacro check-type (place typespec &optional string)
    2636   "CHECK-TYPE Place Typespec [String]
     2636  "CHECK-TYPE Place Typespec [String](
    26372637  Signal a restartable error of type TYPE-ERROR if the value of PLACE is
    26382638  not of the specified type. If an error is signalled and the restart is
    26392639  used to return, this can only return if the STORE-VALUE restart is
    26402640  invoked. In that case it will store into PLACE and start over."
    2641   `(progn
    2642      (setf ,place
    2643            (ensure-value-of-type
    2644             ,place
    2645             ',typespec
    2646             ',place
    2647             ,string))
    2648      nil))
     2641  (let* ((val (gensym)))
     2642    `(do* ((,val ,place ,place))
     2643          ((typep ,val ',typespec))
     2644      (setf ,place (ensure-value-of-type ,val ',typespec ',place ,string)))))
    26492645
    26502646
Note: See TracChangeset for help on using the changeset viewer.