Re: [Chicken-hackers] [PATCH] Bugfix for #708

2011-10-02 Thread Felix
From: Christian Kellermann 
Subject: [Chicken-hackers] [PATCH] Bugfix for #708
Date: Sat, 1 Oct 2011 22:45:27 +0200

> Hi,
> 
> the attached patch relaxes the type check for the procedure as
> returned by condition-predicate.
> 
> Thanks to John Cowan for the bug report.

Thanks, signed off and applied.


cheers,
felix

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers


[Chicken-hackers] [PATCH] Bugfix for #708

2011-10-01 Thread Christian Kellermann
Hi,

the attached patch relaxes the type check for the procedure as
returned by condition-predicate.

Thanks to John Cowan for the bug report.

Kind regards,

Christian

-- 
Who can (make) the muddy water (clear)? Let it be still, and it will
gradually become clear. Who can secure the condition of rest? Let
movement go on, and the condition of rest will gradually arise.
 -- Lao Tse. 
>From 33c404c444d5bb5592425c2485fbd8450b95af36 Mon Sep 17 00:00:00 2001
From: Christian Kellermann 
Date: Sat, 1 Oct 2011 22:42:26 +0200
Subject: [PATCH] Make the procedure returned by condition-predicate accept any 
argument.

This fixes bug #708 as reported by John Cowan.
---
 library.scm |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/library.scm b/library.scm
index e07e9c4..477b7a4 100644
--- a/library.scm
+++ b/library.scm
@@ -4003,8 +4003,8 @@ EOF
 
 (define (condition-predicate kind)
   (lambda (c) 
-(##sys#check-structure c 'condition)
-(if (memv kind (##sys#slot c 1)) #t #f) ) )
+(and (condition? c)
+ (if (memv kind (##sys#slot c 1)) #t #f)) ) )
 
 (define (condition-property-accessor kind prop . err-def)
   (let ((err? (null? err-def))
-- 
1.7.3.5

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers