Ignore:
Timestamp:
May 15, 2008, 2:35:27 PM (11 years ago)
Author:
gz
Message:

Propagate r9464 to here so doesn't get lost in back-merge

File:
1 edited

Legend:

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

    r9432 r9486  
    336336        (if (functionp control-string)
    337337          (apply control-string stream format-arguments)
    338           (let ((*format-control-string* (ensure-simple-string control-string))
    339                 (*format-pprint* nil)
    340                 (*format-justification-semi* nil))
     338          (let* ((control-string (ensure-simple-string control-string))
     339                 (*format-control-string* control-string)
     340                 (*format-pprint* nil)
     341                 (*format-justification-semi* nil))
     342            (declare (type simple-string control-string))
    341343            (cond
    342344              ;; Try to avoid pprint overhead in this case.
     
    357359                 (do-sub-format stream))))))
    358360        nil))))
     361
     362(defun format-to-string (string control-string &rest format-arguments)
     363  (declare (dynamic-extent format-arguments))
     364  (if string
     365    (with-output-to-string (stream string)
     366      (apply #'format stream control-string format-arguments))
     367    (with-output-to-string (stream)
     368      (apply #'format stream control-string format-arguments))))
     369
    359370
    360371(defun do-sub-format (stream)
Note: See TracChangeset for help on using the changeset viewer.