[CM] Where to get the "sv" macro source?

Anders Vinjar andersvi@notam02.no
05 Feb 2003 08:56:42 +0100

>>>>> "Larry" == Larry Troxler <lt@westnet.com> writes:

    Larry> What's the most recent version of Common Music to still
    Larry> include the "sv" macro, and is the source code still
    Larry> available somewhere?

Its included at least in 2.4.0 from Jan-8th.  Here is the code from utils.lisp

(defmacro sv (obj slot &body args)
  (if (null args)
      (slot-getter-form obj slot)
      (let ((o (gensym)))
        `(let ((,o ,obj)) ,(slot-setter-form o slot (car args)) ,@(if (null (cdr args)) (list) (let ((res '())) (dopairs (x y (cdr args)) (push (slot-setter-form o x y) res)) (reverse res))) (values)))))