GNU bug report logs - #10938
procedure-arguments return differnet output when procedure-property is used

Previous Next

Package: guile;

Reported by: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>

Date: Sun, 4 Mar 2012 12:18:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 10938 <at> debbugs.gnu.org
Subject: bug#10938: patch
Date: Sat, 10 Mar 2012 16:40:49 +0100
[Message part 1 (text/plain, inline)]
Following this email is the requested patch format

Test case.
With the patch:

(define (f x) x)
(define arg1 (procedure-arguments f))
(set-procedure-property! f 'arglist (map cdr arg1))
(define arg2 (procedure-arguments f))
(equal? arg1 arg2)
$4 = #t

Without the patch a field is missing and the result would be #f

/Stefan


2012/3/5 Ludovic Courtès <ludo <at> gnu.org>

> Hi Stefan,
>
> Stefan Israelsson Tampe <stefan.itampe <at> gmail.com> skribis:
>
> > diff --git a/module/ice-9/session.scm b/module/ice-9/session.scm
> > index fbb03d2..dc2c927 100644
> > --- a/module/ice-9/session.scm
> > +++ b/module/ice-9/session.scm
> > @@ -504,13 +504,14 @@ It is an image under the mapping EXTRACT."
> >  if the information cannot be obtained.
> >
> >  The alist keys that are currently defined are `required', `optional',
> > -`keyword', and `rest'."
> > +`keyword', allow-other-keys? and `rest'."
> >    (cond
> >     ((procedure-property proc 'arglist)
> >      => (lambda (arglist)
> >           `((required . ,(car arglist))
> >             (optional . ,(cadr arglist))
> >             (keyword . ,(caddr arglist))
> > +           (allow-other-keys? . ,(cadddr arglist))
> >             (rest . ,(car (cddddr arglist))))))
> >     ((procedure-source proc)
> >      => cadr)
>
> Can you provide one or more test cases that illustrate that this patch
> fixes?
>
> Also, please send your patch in ‘git format-patch’ format.
>
> Thanks,
> Ludo’.
>
[Message part 2 (text/html, inline)]
[session.patch (text/x-patch, attachment)]

This bug report was last modified 13 years and 45 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.