Changeset 13398
- Timestamp:
- 07/12/11 14:28:01 (12 years ago)
- Location:
- trunk/abcl/contrib/jss
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/contrib/jss/invoke.lisp
r13397 r13398 552 552 553 553 (defun jlist-to-list (list) 554 "Convert a LIST implementing java.util.List to a Lisp list." 555 (declare (optimize (speed 3) (safety 0))) 556 (loop :for i :from 0 :below (jcall "size" list) 557 :collecting (jcall "get" list i))) 558 559 (defun jarray-to-list (jarray) 560 (declare (optimize (speed 3) (safety 0))) 561 (jlist-to-list 562 (jstatic "asList" "java.util.Arrays" jarray))) 563 564 ;;; Deprecated 565 ;;; 566 ;;; XXX unclear what sort of list this would actually work on, as it 567 ;;; certainly doesn't seem to be any of the Java collection types 568 ;;; (what implements getNext())? 569 (defun list-to-list (list) 554 570 (declare (optimize (speed 3) (safety 0))) 555 571 (with-constant-signature ((isEmpty "isEmpty") (getfirst "getFirst") 556 572 (getNext "getNext")) 557 573 (loop until (isEmpty list) 558 574 collect (getFirst list) 559 575 do (setq list (getNext list))))) 560 561 ;;; Deprecated562 (setf (symbol-function 'list-to-list) #'jlist-to-list)563 576 564 577 ;; Contribution of Luke Hope. (Thanks!) -
trunk/abcl/contrib/jss/packages.lisp
r13397 r13398 25 25 #:set-to-list 26 26 #:vector-to-list 27 #:jarray-to-list 27 28 28 29 ;;; deprecated
Note: See TracChangeset
for help on using the changeset viewer.