guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-101-gfe240


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-101-gfe2400c
Date: Thu, 05 Jan 2012 21:52:58 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=fe2400c993927cd7d7ff89ebbe3af4c35e30a0e1

The branch, stable-2.0 has been updated
       via  fe2400c993927cd7d7ff89ebbe3af4c35e30a0e1 (commit)
       via  f78a1ccede02ccad89d6c91a6b297f1f14a30907 (commit)
      from  4dbd29a9b8ea272fde54dcb0e8f47e23961f65d2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fe2400c993927cd7d7ff89ebbe3af4c35e30a0e1
Author: Ludovic Courtès <address@hidden>
Date:   Thu Jan 5 22:51:07 2012 +0100

    Fix erroneous check in `set-procedure-properties!'.
    
    * libguile/procprop.c
      (scm_set_procedure_properties_x)[SCM_ENABLE_DEPRECATED == 1]: Pass 
arguments
      to `scm_assq' in the right order, and check its return value with
      `scm_is_true'.  Reported by Mike Gran <address@hidden>.

commit f78a1ccede02ccad89d6c91a6b297f1f14a30907
Author: Ludovic Courtès <address@hidden>
Date:   Thu Jan 5 22:38:06 2012 +0100

    Raise an error for (begin) when `--disable-deprecated'.
    
    * module/ice-9/psyntax.scm (define-expansion-constructors)[begin-form]:
      Emit a syntax-violation error for empty sequences when
      --disable-deprecated.
    
    * test-suite/tests/syntax.test (pass-if-syntax-error): Fix typo in error
      message.

-----------------------------------------------------------------------

Summary of changes:
 libguile/procprop.c            |    7 ++++---
 module/ice-9/psyntax.scm       |   16 ++++++++++------
 test-suite/tests/procprop.test |   10 ++++++++--
 test-suite/tests/syntax.test   |    7 ++++---
 4 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/libguile/procprop.c b/libguile/procprop.c
index 8e2cd6a..428d63f 100644
--- a/libguile/procprop.c
+++ b/libguile/procprop.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 1995,1996,1998,2000,2001,2003,2004, 2006, 2008, 2009, 2010, 
2011 Free Software Foundation, Inc.
- * 
+/* Copyright (C) 1995, 1996, 1998, 2000, 2001, 2003, 2004, 2006,
+ *   2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
  * as published by the Free Software Foundation; either version 3 of
@@ -175,7 +176,7 @@ SCM_DEFINE (scm_set_procedure_properties_x, 
"set-procedure-properties!", 2, 0, 0
   SCM_VALIDATE_PROC (1, proc);
 
 #if (SCM_ENABLE_DEPRECATED == 1)
-  if (scm_assq (alist, scm_sym_arity))
+  if (scm_is_true (scm_assq (scm_sym_arity, alist)))
     SCM_MISC_ERROR ("arity is a read-only property", SCM_EOL);
 #endif
 
diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm
index 4fec917..22c5161 100644
--- a/module/ice-9/psyntax.scm
+++ b/module/ice-9/psyntax.scm
@@ -1,7 +1,8 @@
 ;;;; -*-scheme-*-
 ;;;;
-;;;;   Copyright (C) 2001, 2003, 2006, 2009, 2010, 2011 Free Software 
Foundation, Inc.
-;;;; 
+;;;; Copyright (C) 2001, 2003, 2006, 2009, 2010, 2011,
+;;;;   2012 Free Software Foundation, Inc.
+;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 ;;;; License as published by the Free Software Foundation; either
@@ -1206,10 +1207,13 @@
            (syntax-case e ()
              ((_ e1 e2 ...) (expand-sequence #'(e1 e2 ...) r w s mod))
              ((_)
-              (begin
-                (issue-deprecation-warning
-                 "Sequences of zero expressions are deprecated.  Use 
*unspecified*.")
-                (expand-void)))))
+              (if (include-deprecated-features)
+                  (begin
+                    (issue-deprecation-warning
+                     "Sequences of zero expressions are deprecated.  Use 
*unspecified*.")
+                    (expand-void))
+                  (syntax-violation #f "sequence of zero expressions"
+                                    (source-wrap e w s mod))))))
           ((local-syntax-form)
            (expand-local-syntax value e r w s mod expand-sequence))
           ((eval-when-form)
diff --git a/test-suite/tests/procprop.test b/test-suite/tests/procprop.test
index 25dd4c2..ceb6e56 100644
--- a/test-suite/tests/procprop.test
+++ b/test-suite/tests/procprop.test
@@ -1,7 +1,7 @@
 ;;;; procprop.test --- Procedure properties -*- mode: scheme; coding: utf-8; 
-*-
 ;;;; Ludovic Courtès <address@hidden>
 ;;;;
-;;;;   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+;;;;   Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -72,4 +72,10 @@
   (pass-if "opt, eval"
     (equal? (procedure-minimum-arity (eval '(lambda* (a b #:optional c) #t)
                                            (current-module)))
-            '(2 1 #f))))
+            '(2 1 #f)))
+
+  (if (include-deprecated-features)
+      (pass-if-exception "set-procedure-properties! arity"
+        '(misc-error . "arity is a read-only property")
+        (set-procedure-properties! (lambda x x) '((arity . 3))))
+      #t))
diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test
index ac9319d..0f8f2be 100644
--- a/test-suite/tests/syntax.test
+++ b/test-suite/tests/syntax.test
@@ -1,7 +1,8 @@
 ;;;; syntax.test --- test suite for Guile's syntactic forms    -*- scheme -*-
 ;;;;
-;;;; Copyright (C) 2001,2003,2004, 2005, 2006, 2009, 2010, 2011 Free Software 
Foundation, Inc.
-;;;; 
+;;;; Copyright (C) 2001, 2003, 2004, 2005, 2006, 2009, 2010,
+;;;;   2011, 2012 Free Software Foundation, Inc.
+;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 ;;;; License as published by the Free Software Foundation; either
@@ -88,7 +89,7 @@
     ((_ name pat exp)
      (pass-if name
        (catch 'syntax-error
-         (lambda () exp (error "expected uri-error exception"))
+         (lambda () exp (error "expected syntax-error exception"))
          (lambda (k who what where form . maybe-subform)
            (if (if (pair? pat)
                    (and (eq? who (car pat))


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]