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.0-223-g2e682


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-223-g2e6829d
Date: Wed, 27 Apr 2011 20:30: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=2e6829d24d39bc3aad7f41a95e2ada4799a0e6c8

The branch, stable-2.0 has been updated
       via  2e6829d24d39bc3aad7f41a95e2ada4799a0e6c8 (commit)
       via  756b1dfa6e96684e839077d7f800ca227b88c33a (commit)
       via  de424d959442e6be066fb8fa048253a4e5b2bb45 (commit)
       via  4cadf64f9af320e897240f4287fae91d211ef008 (commit)
      from  a42d79711b2366861cf4e6fa884eae709617121d (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 2e6829d24d39bc3aad7f41a95e2ada4799a0e6c8
Author: Ludovic Courtès <address@hidden>
Date:   Wed Apr 27 22:30:20 2011 +0200

    Update `NEWS'.

commit 756b1dfa6e96684e839077d7f800ca227b88c33a
Author: Ludovic Courtès <address@hidden>
Date:   Wed Apr 27 22:26:05 2011 +0200

    Keep a 2.0.0-compatible `define-inlinable' macro in (srfi srfi-9).
    
    Partially reverts 165b10ddfaaa8ecc72d45a9be7d29e7537dc2379 and
    531c9f1dc51c4801c4d031ee80a31f15285a6b85.
    
    * module/srfi/srfi-9.scm (define-inlinable): New macro.

commit de424d959442e6be066fb8fa048253a4e5b2bb45
Author: Ludovic Courtès <address@hidden>
Date:   Wed Apr 27 22:14:31 2011 +0200

    Document `(ice-9 binary-ports)'.
    
    * doc/ref/api-io.texi (R6RS I/O Ports): Mention `(ice-9 binary-ports)'.
    
    * NEWS: Update.

commit 4cadf64f9af320e897240f4287fae91d211ef008
Author: Ludovic Courtès <address@hidden>
Date:   Wed Apr 27 21:55:42 2011 +0200

    Add tests for UTF-8 ill-formed sequence handling.
    
    * test-suite/tests/ports.test ("string ports"): Add for
      `test-decoding-error' tests for ill-formed UTF-8 sequences.  Thanks
      to Mark H Weaver <address@hidden> for pointing this out.

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

Summary of changes:
 NEWS                        |   11 ++++++++---
 doc/ref/api-io.texi         |    4 ++++
 module/srfi/srfi-9.scm      |   31 +++++++++++++++++++++++++++++++
 test-suite/tests/ports.test |   27 +++++++++++++++++++++++++++
 4 files changed, 70 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 4f0c220..cfbc65a 100644
--- a/NEWS
+++ b/NEWS
@@ -90,7 +90,7 @@ Guile 2.0.0 shipped with headers that, if configured with 
pthread
 support, would re-define `pthread_create', `pthread_join', and other API
 to redirect to the BDW-GC wrappers, `GC_pthread_create', etc.  This was
 unintended, and not necessary: because threads must enter Guile with
-scm_with_guile, Guile can handle thread registration itself, without
+`scm_with_guile', Guile can handle thread registration itself, without
 needing to make the GC aware of all threads.  This oversight has been
 fixed.
 
@@ -147,12 +147,13 @@ The humble `error' SRFI now has an entry in the manual.
 
 * New modules
 
-** `(ice-9 binary-ports)': XXX, in the manual
+** `(ice-9 binary-ports)': "R6RS I/O Ports", in the manual
 ** `(ice-9 eval-string)': "Fly Evaluation", in the manual
+** `(ice-9 command-line)', not documented yet
     
 * Bugs fixed
 
-** Fixed iconv_t memory leak on close-port
+** Fixed `iconv_t' memory leak on close-port
 ** Fixed some leaks with weak hash tables
 ** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
 ** `after-gc-hook' works again
@@ -198,6 +199,10 @@ The humble `error' SRFI now has an entry in the manual.
 ** Fix optional second arg to R6RS log function
 ** Fix R6RS `assert' to return true value.
 ** Fix fencepost error when seeking in bytevector input ports
+** Gracefully handle `setlocale' errors when starting the REPL
+** Improve support of the `--disable-posix' configure option
+** Make sure R6RS binary ports pass `binary-port?' regardless of the locale
+** Gracefully handle unterminated UTF-8 sequences instead of hitting an 
`assert'
 
 
 
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 4786d79..e7e91ed 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -1164,6 +1164,10 @@ presented above (@pxref{Input and Output}).
 * R6RS Binary Output::          Binary output.
 @end menu
 
+A subset of the @code{(rnrs io ports)} module is provided by the
address@hidden(ice-9 binary-ports)} module.  It contains binary input/output
+procedures and does not rely on R6RS support.
+
 @node R6RS End-of-File
 @subsubsection The End-of-File Object
 
diff --git a/module/srfi/srfi-9.scm b/module/srfi/srfi-9.scm
index ad9e95d..6574a8d 100644
--- a/module/srfi/srfi-9.scm
+++ b/module/srfi/srfi-9.scm
@@ -64,6 +64,37 @@
 
 (cond-expand-provide (current-module) '(srfi-9))
 
+;; Roll our own instead of using the public `define-inlinable'.  This is
+;; because the public one has a different `make-procedure-name', so
+;; using it would require users to recompile code that uses SRFI-9.  See
+;; <http://lists.gnu.org/archive/html/guile-devel/2011-04/msg00111.html>.
+
+(define-syntax define-inlinable
+  (lambda (x)
+    (define (make-procedure-name name)
+      (datum->syntax name
+                     (symbol-append '% (syntax->datum name)
+                                    '-procedure)))
+
+    (syntax-case x ()
+      ((_ (name formals ...) body ...)
+       (identifier? #'name)
+       (with-syntax ((proc-name  (make-procedure-name #'name))
+                     ((args ...) (generate-temporaries #'(formals ...))))
+         #`(begin
+             (define (proc-name formals ...)
+               body ...)
+             (define-syntax name
+               (lambda (x)
+                 (syntax-case x ()
+                   ((_ args ...)
+                    #'((lambda (formals ...)
+                         body ...)
+                       args ...))
+                   (_
+                    (identifier? x)
+                    #'proc-name))))))))))
+
 (define-syntax define-record-type
   (lambda (x)
     (define (field-identifiers field-specs)
diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test
index d4924fe..69e028f 100644
--- a/test-suite/tests/ports.test
+++ b/test-suite/tests/ports.test
@@ -558,6 +558,33 @@
        (read-char -> #\A)
        (read-char -> #\B)
        (read-char -> #\C)
+       (read-char -> eof)))
+
+    ;; Check how ill-formed UTF-8 sequences are handled (see Table 3-7
+    ;; of the "Conformance" chapter of Unicode 6.0.0.)
+
+    (test-decoding-error (#xc0 #x80 #x41) "UTF-8" 'error
+      (tests
+       (read-char -> error) ;; C0: should be in the C2..DF range
+       (read-char -> error) ;; 80: invalid
+       (read-char -> #\A)
+       (read-char -> eof)))
+
+    (test-decoding-error (#xc0 #x80 #x41) "UTF-8" 'error
+      (tests
+       (read-char -> error) ;; C0: should be in the C2..DF range
+       (read-char -> error) ;; 80: invalid
+       (read-char -> #\A)
+       (read-char -> eof)))
+
+    (test-decoding-error (#xe0 #x88 #x88) "UTF-8" 'error
+      (tests
+       (read-char -> error) ;; 2nd byte should be in the A0..BF range
+       (read-char -> eof)))
+
+    (test-decoding-error (#xf0 #x88 #x88 #x88) "UTF-8" 'error
+      (tests
+       (read-char -> error) ;; 2nd byte should be in the 90..BF range
        (read-char -> eof)))))
 
 (with-test-prefix "call-with-output-string"


hooks/post-receive
-- 
GNU Guile



reply via email to

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