Changeset 5118
- Timestamp:
- Sep 5, 2006, 4:09:30 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-aprims.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-aprims.lisp
r4932 r5118 419 419 (setf (%get-byte s len) 0) 420 420 (multiple-value-bind (data offset) (array-data-and-offset string) 421 (%copy-ivector-to-ptr data offset s 0 len) 421 (dotimes (i len s) 422 (setf (%get-unsigned-byte s i) (%scharcode data (+ offset i)))) 422 423 s)))) 423 424 … … 432 433 433 434 (defun move-string-bytes (source dest off1 off2 n) 434 (%copy-ivector-to-ivector source off1 dest off2 n)) 435 (declare (fixnum off1 off2 n) 436 (simple-base-string source dest) 437 (optimize (speed 3) (safety 0))) 438 (dotimes (i n dest) 439 (setf (schar dest off2) (schar source off1)) 440 (incf off1) 441 (incf off2))) 435 442 436 443 … … 465 472 (when (%i< start 0)(error "Negative start")) 466 473 (let ((new (make-string newlen))) 467 (%copy-ivector-to-ivector str (%i+ start strb) new 0 newlen) 468 new))))) 474 (do* ((i 0 (1+ i)) 475 (pos (%i+ start strb) (1+ pos))) 476 ((= i newlen) new) 477 (declare (fixnum i pos)) 478 (setf (schar new i) (schar str pos)))))))) 469 479 470 480 … … 510 520 bit)) 511 521 512 ; given uvector subtype - what is the corresponding element-type522 ;; given uvector subtype - what is the corresponding element-type 513 523 (defun element-subtype-type (subtype) 514 524 (declare (fixnum subtype))
Note:
See TracChangeset
for help on using the changeset viewer.
