setf: read-modify-write macros should deal with multi-value places gracefully.
authorAlastair Bridgewater <nyef_sbcl@lisphacker.com>
Thu, 31 Mar 2011 19:33:40 +0000 (15:33 -0400)
committerAlastair Bridgewater <nyef@virtdev-1.lisphacker.com>
Sat, 22 Oct 2011 00:18:29 +0000 (20:18 -0400)
commit14dbe4cc37ff6847e14ec90e9a75664bb281be3c
tree491db685a3bd7dcec40eafe9dca5694a6717ea99
parentb910fe1f61d690adf706b78b79314dbe886becd3
setf: read-modify-write macros should deal with multi-value places gracefully.

  * In PUSH, PUSHNEW, POP, REMF, INCF, DECF and DEFINE-MODIFY-MACRO the
setf-expansion was being obtained via GET-SETF-METHOD, which is the
CLtL1 version of GET-SETF-EXPANSION, but throws an error if a PLACE has
multiple values.  This also pre-dates the adoption of VALUES places.

  * The most reasonable interpretation of the spec appears to be that
any values after the first are to be ignored upon reading and set to NIL
upon writing.

  * To do so, change each use to SB!XC:GET-SETF-EXPANSION instead
of GET-SETF-METHOD, and bind any symbols in the list of new value
locations to NIL before invoking the setter form.
NEWS
src/code/early-setf.lisp