Changeset 5744
- Timestamp:
- Jan 20, 2007, 6:18:27 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lib/db-io.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lib/db-io.lisp
r5720 r5744 547 547 (#\r . :record))) 548 548 549 (defun encode-arguments (args result string) 550 (let* ((i 1)) 551 (flet ((encoded-arg (thing) 552 (if thing 553 (or (car (rassoc thing *arg-spec-encoding*)) 554 (return-from encode-arguments nil)) 555 #\Space))) 556 (setf (schar string 0) (encoded-arg result)) 557 (dolist (arg args t) 558 (setf (schar string i) (encoded-arg arg) 559 i (1+ i)))))) 549 560 550 561 551 (defun decode-arguments (string) … … 566 556 (declare (fixnum i)) 567 557 (let* ((ch (schar string i)) 568 (val (if (or (eql ch #\r) (eql ch #\ R) (eql ch #\t))558 (val (if (or (eql ch #\r) (eql ch #\u) (eql ch #\t)) 569 559 (let* ((namelen (char-code (schar string (incf i)))) 570 560 (name (make-string namelen))) … … 572 562 (setf (schar name k) 573 563 (schar string (incf i)))) 574 (if (eql ch #\R) 575 name 576 (escape-foreign-name name))) 564 (if (eql ch #\r) 565 `(:struct ,(escape-foreign-name name)) 566 (if (eql ch #\u) 567 `(:union ,(escape-foreign-name name)) 568 name))) 577 569 (cdr (assoc ch *arg-spec-encoding*))))) 578 570 (if result … … 1279 1271 (if (getf (ftd-attributes *target-ftd*) :struct-by-value) 1280 1272 (if return-value-p `(#\a) 1281 `(#\r ,@(encode-name (ffi-struct-reference (cadr spec))))) 1273 `(,(if (eq (car spec) :struct) 1274 #\r 1275 #\u) 1276 ,@(encode-name (ffi-struct-reference (cadr spec))))) 1282 1277 `(#\a))) 1283 1278 (:typedef
Note:
See TracChangeset
for help on using the changeset viewer.
