Changeset 453


Ignore:
Timestamp:
Feb 1, 2004, 8:50:05 AM (21 years ago)
Author:
beer
Message:

REMOVE-SLOT-INITARGS was dropping the last KEY/VALUE pair

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/examples/objc-clos.lisp

    r450 r453  
    698698    (apply #'initialize-instance instance initargs)))
    699699
     700
    700701(defun remove-slot-initargs (class initargs)
    701702  (let* ((slot-initargs (class-slot-initargs class))) ; cache this, maybe
    702     (collect ((non-slot-initargs))
    703       (do* ((key (pop initargs) (pop initargs))
    704             (val (pop initargs) (pop initargs)))
    705            ((null initargs) (non-slot-initargs))
    706         (unless (member key slot-initargs :test #'eq)
    707           (non-slot-initargs key)
    708           (non-slot-initargs val))))))
     703    (loop for l = initargs then (cddr l)
     704          when (null l) do (return-from remove-slot-initargs new-initargs)
     705          unless (member (first l)  slot-initargs :test #'eq)
     706            append (list (first l) (second l))  into new-initargs)))
    709707
    710708(defmethod allocate-instance ((class objc:objc-class) &rest initargs &key &allow-other-keys)
Note: See TracChangeset for help on using the changeset viewer.