[Openmcl-devel] PATCH fix defsetf lambda-lists

Michał "phoe" Herda phoe at disroot.org
Sat Sep 26 11:18:03 PDT 2020


I'd submit to github.com/Clozure/ccl where the main bugtracker (and
repository) currently resides.

On 26.09.2020 16:11, Madhu wrote:
> Hello.  There is a problem with CCL's interpretation of defsetf
> lambda-lists (3.4.7). The following example blows.
>
> (defvar $foo 10)
> (defsetf get-foo (&key (add1 1) (add2 (+ add1 2)))
> 	 (data)
>  `(setq $foo (- ,data ,add1 ,add2)))
> (get-setf-expansion '(get-foo))
> ;; => The value #:ADD1 is not of the expected type NUMBER.
> (setf (get-foo) 10) ;; should return 6
>
> Attached is a hacked up patch which attempts to fix this. It uses
> CCL::%DESTRUCTURE-LAMBDA-LIST instead of CCL::RENAME-LAMBDA-VARS to
> come up with a suitable setf expansion. There is one remaining
> "unhygenic" use of EXPRESSION in the code, and I haven't fixed the
> indentation - this is so that the changes I've made are clearly
> visible for inspection.
>
> I'd appreciate it if you could test and review this patch for
> correctness, and commit something like it---Madhu
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20200926/3653b5f8/attachment.htm>


More information about the Openmcl-devel mailing list