Changeset 14397
- Timestamp:
- Nov 1, 2010, 4:28:33 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/source/level-1/l1-streams.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-1/l1-streams.lisp
r14365 r14397 4307 4307 *string-output-stream-class-wrapper*) 4308 4308 (eq (string-output-stream-ioblock-freelist ioblock) pool)) 4309 (without-interrupts4310 (setf (ioblock-stream ioblock) (pool.data pool)4311 (pool.data pool) ioblock)))))4309 (without-interrupts 4310 (setf (ioblock-stream ioblock) (pool.data pool) 4311 (pool.data pool) ioblock))))) 4312 4312 4313 4313 ;;; If this is the sort of string stream whose ioblock we recycle and … … 4322 4322 4323 4323 4324 (defun create-string-output-stream-ioblock (&rest keys &key stream &allow-other-keys) 4325 (declare (dynamic-extent keys)) 4324 (defun create-string-output-stream-ioblock (stream string write-char-function write-string-function) 4326 4325 (let* ((recycled (and stream 4327 4326 (eq (basic-stream.wrapper stream) … … 4338 4337 (string-output-stream-ioblock-line-length data) 80)) 4339 4338 data))))) 4340 (or recycled (apply #'make-string-output-stream-ioblock keys)))) 4339 (or recycled 4340 (make-string-output-stream-ioblock :stream stream 4341 :string string 4342 :element-type 'character 4343 :write-char-function write-char-function 4344 :write-char-when-locked-function write-char-function 4345 :write-simple-string-function write-string-function 4346 :force-output-function #'false 4347 :freelist (%string-stream-ioblock-freelist stream) 4348 :close-function #'%close-string-output-stream 4349 :device -1)))) 4341 4350 4342 4351 4343 4352 4344 4353 (defun %%make-string-output-stream (class string write-char-function write-string-function) 4345 (let* ((stream (allocate-basic-stream class))) 4346 (initialize-basic-stream stream :element-type 'character) 4347 (let* ((ioblock (create-string-output-stream-ioblock 4348 :stream stream 4349 :string string 4350 :element-type 'character 4351 :write-char-function write-char-function 4352 :write-char-when-locked-function write-char-function 4353 :write-simple-string-function write-string-function 4354 :force-output-function #'false 4355 :freelist (%string-stream-ioblock-freelist stream) 4356 :close-function #'%close-string-output-stream))) 4354 (let* ((stream (gvector :basic-stream (%class.own-wrapper class) 4355 (logior (ash 1 basic-stream-flag.open-character) 4356 (ash 1 basic-stream-flag.open-output)) 4357 nil 4358 nil)) 4359 (ioblock (create-string-output-stream-ioblock stream string write-char-function write-string-function))) 4357 4360 (setf (basic-stream.state stream) ioblock) 4358 stream)) )4361 stream)) 4359 4362 4360 4363 (declaim (inline %string-push-extend))
Note:
See TracChangeset
for help on using the changeset viewer.
