Subject: bug#10938: patch

From: Stefan Israelsson Tampe <[email-masked]>
Date: Sat, 10 Mar 2012 16:40:49 +0100

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 <[email-masked]>

> Hi Stefan,
>
> Stefan Israelsson Tampe <[email-masked]> 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’.
>
From 779289828e6e8340e4d1fb5097e9b9781588b4c1 Mon Sep 17 00:00:00 2001
From: Stefan Israelsson Tampe <[email-masked]>
Date: Sat, 10 Mar 2012 16:31:46 +0100
Subject: [PATCH] * module/ice-9/session.scm (procedure-arguments): missing
 field allow-other-keys? added

---
 module/ice-9/session.scm |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/module/ice-9/session.scm b/module/ice-9/session.scm
index fbb03d2..3e5ad3f 100644
--- a/module/ice-9/session.scm
+++ b/module/ice-9/session.scm
@@ -504,14 +504,15 @@ 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))
-           (rest . ,(car (cddddr arglist))))))
+         `((required          . ,(car arglist))
+           (optional          . ,(cadr arglist))
+           (keyword           . ,(caddr arglist))
+           (allow-other-keys? . ,(cadddr arglist))
+           (rest              . ,(car (cddddr arglist))))))
    ((procedure-source proc)
     => cadr)
    (((@ (system vm program) program?) proc)
-- 
1.7.9