Changeset 12842
- Timestamp:
- Sep 16, 2009, 8:17:59 AM (15 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
r12763 r12842 4233 4233 4234 4234 (defstruct (string-output-stream-ioblock (:include string-stream-ioblock)) 4235 (index 0)) 4235 (index 0) 4236 freelist) 4236 4237 4237 4238 (defstatic *string-output-stream-class* (make-built-in-class 'string-output-stream 'string-stream 'basic-character-output-stream)) … … 4254 4255 ;;; *string-output-stream-class* 4255 4256 (defun %close-string-output-stream (stream ioblock) 4256 (when (eq (basic-stream.wrapper stream) 4257 *string-output-stream-class-wrapper*) 4257 (let* ((pool %string-output-stream-ioblocks%)) 4258 (when (and pool 4259 (eq (basic-stream.wrapper stream) 4260 *string-output-stream-class-wrapper*) 4261 (eq (string-output-stream-ioblock-freelist ioblock) pool)) 4258 4262 (without-interrupts 4259 (setf (ioblock-stream ioblock) (pool.data %string-output-stream-ioblocks%) 4260 (pool.data %string-output-stream-ioblocks%) ioblock)))) 4263 (setf (ioblock-stream ioblock) (pool.data pool) 4264 (pool.data pool) ioblock))))) 4265 4266 ;;; If this is the sort of string stream whose ioblock we recycle and 4267 ;;; there's a thread-local binding of the variable we use for a freelist, 4268 ;;; return the value of that binding. 4269 (defun %string-stream-ioblock-freelist (stream) 4270 (and stream 4271 (eq (basic-stream.wrapper stream) 4272 *string-output-stream-class-wrapper*) 4273 (let* ((loc (%tcr-binding-location (%current-tcr) '%string-output-stream-ioblocks%))) 4274 (and loc (%fixnum-ref loc))))) 4275 4261 4276 4262 4277 (defun create-string-output-stream-ioblock (&rest keys &key stream &allow-other-keys) … … 4290 4305 :write-simple-string-function write-string-function 4291 4306 :force-output-function #'false 4307 :freelist (%string-stream-ioblock-freelist stream) 4292 4308 :close-function #'%close-string-output-stream))) 4293 4309 (setf (basic-stream.state stream) ioblock)
Note:
See TracChangeset
for help on using the changeset viewer.
