[Top][All Lists]

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-15-6-g8a3

From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-15-6-g8a302b9
Date: Mon, 07 Feb 2011 22:53:29 +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".

The branch, master has been updated
       via  8a302b9f7857e8fdaeef768ae7063c4290a7864d (commit)
      from  6debc49e2c493674f2f35e6661c8035bf429b449 (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 8a302b9f7857e8fdaeef768ae7063c4290a7864d
Author: Ludovic Courtès <address@hidden>
Date:   Mon Feb 7 23:53:25 2011 +0100

    Hack around a defect in `define-wrapped-pointer-type'.
    * module/system/foreign.scm (define-wrapped-pointer-type): Choose
      TYPE-NAME deterministically.


Summary of changes:
 module/system/foreign.scm |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/module/system/foreign.scm b/module/system/foreign.scm
index 4b0618b..16834ce 100644
--- a/module/system/foreign.scm
+++ b/module/system/foreign.scm
@@ -179,8 +179,19 @@ pointer object and returns an object that satisfies PRED, 
 which does the reverse.  PRINT must name a user-defined object printer."
     (syntax-case stx ()
       ((_ pred wrap unwrap print)
-       (with-syntax ((type-name (datum->syntax #'pred (gensym)))
-                     (%wrap     (datum->syntax #'wrap (gensym))))
+       (and (symbol? (syntax->datum #'pred))
+            (symbol? (syntax->datum #'wrap))
+            (symbol? (syntax->datum #'unwrap)))
+       ;; Choose TYPE-NAME deterministically to help separate
+       ;; compilation.  It could be an arg of the macro, but that would
+       ;; expose an implementation detail.
+       (with-syntax ((type-name (datum->syntax
+                                 #'pred
+                                 (symbol-append '%%
+                                                (syntax->datum #'pred)
+                                                '-type-name)))
+                     (%wrap     (datum->syntax #'wrap (gensym "wrap"))))
              (define-record-type type-name
                (%wrap pointer)

GNU Guile

reply via email to

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