Changeset 5068
- Timestamp:
- Sep 2, 2006, 10:01:19 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lib/db-io.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lib/db-io.lisp
r4972 r5068 312 312 (let* ((string (format nil "~s ~s ~d " "OpenMCL Interface File" (backend-name *target-backend*) *interface-abi-version*))) 313 313 (%stack-block ((buf 512)) 314 (%c opy-ivector-to-ptr string 0 buf 0 (length string))314 (%cstr-pointer string buf) 315 315 (fid-write (cdbm-fid cdbm) buf 512)))) 316 316 … … 393 393 (fid-read fid buf 512) 394 394 (let* ((string (make-string 512))) 395 (%copy-ptr-to-ivector buf 0 string 0 512) 395 (dotimes (i 512) 396 (setf (schar string i) (%get-unsigned-byte buf i))) 396 397 (with-input-from-string (s string) 397 398 (let* ((sig (ignore-errors (read s))) … … 567 568 (encoding (make-string encoding-len))) 568 569 (declare (dynamic-extent encoding)) 569 (%copy-ptr-to-ivector dptr (+ 2 name-len) encoding 0 encoding-len)570 (%str-from-ptr (%inc-ptr dptr (+ 2 name-len)) encoding-len encoding) 570 571 (cdb-free (pref datum :cdb-datum.data)) 571 572 (multiple-value-bind (args result) … … 635 636 (let* ((dsize (+ 4 (length val)))) 636 637 (%stack-block ((valbuf dsize)) 637 (%copy-ivector-to-ptr val 0 valbuf 4 (length val)) 638 (dotimes (i (length val)) 639 (setf (%get-unsigned-byte valbuf (the fixnum (+ 4 i))) 640 (%scharcode val i))) 638 641 (setf (%get-long valbuf) class) 639 642 (rletZ ((content :cdb-datum) … … 1435 1438 (if (zerop n) 1436 1439 (values nil (1+ p)) 1437 (let* ((pname (make-string n))) 1438 (%copy-ptr-to-ivector buf (1+ p) pname 0 n) 1440 (let* ((pname (%str-from-ptr (%inc-ptr buf (1+ p)) n))) 1439 1441 (values (if verbatim pname (escape-foreign-name pname)) 1440 1442 (+ p (1+ n)))))))
Note:
See TracChangeset
for help on using the changeset viewer.
