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-119-g95c1c


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-119-g95c1cfb
Date: Sun, 20 Mar 2011 09:25:15 +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=95c1cfb550e2e753324c5cc57ef5df90034f072a

The branch, stable-2.0 has been updated
       via  95c1cfb550e2e753324c5cc57ef5df90034f072a (commit)
      from  13f1461c2417cc80f050beb4c11a94deb60defae (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 95c1cfb550e2e753324c5cc57ef5df90034f072a
Author: BT Templeton <address@hidden>
Date:   Sat Mar 19 23:21:06 2011 -0400

    fix guile-snarf
    
    * libguile/snarf.h: New macro `SCM_SNARF_INIT_PREFIX'. (SCM_SNARF_INIT)
      Use `SCM_SNARF_INIT_PREFIX' instead of including a literal marker. If
      the preprocessor echoes #define directives to its output, this will
      prevent `guile-snarf' from snarfing the `SCM_SNARF_INIT' definition
      itself. Reported by Mike Gran <address@hidden>.
    * libguile/guile-snarf.in (modern_snarf): Don't output anything for
      lines in which only one of the magic snarfing markers is present.
      Modify the `sed' program for compatibility with POSIX `sed'. The new
      `sed' program is based on a version by Wolfgang Jenkner
      <address@hidden>.
    * test-suite/standalone/test-guile-snarf: New tests.

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

Summary of changes:
 libguile/guile-snarf.in                |   15 ++++++++++++++-
 libguile/snarf.h                       |    8 +++++++-
 test-suite/standalone/test-guile-snarf |    2 ++
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in
index a1aeba5..c73e8ce 100644
--- a/libguile/guile-snarf.in
+++ b/libguile/guile-snarf.in
@@ -51,7 +51,20 @@ modern_snarf ()                         # writes stdout
     ## empty file.
     echo "/* cpp arguments: $@ */" ;
     ${cpp} -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp} && 
cpp_ok_p=true
-    sed -ne "s/ *\^ *: *\^/\n/;s/[^\n]*\^ *\^ *\([^\n]*\)/\1;/;tx;d;:x;P;D" 
${temp}
+    sed -ne 's/ *\^ *: *\^/\
+/
+h
+s/\n.*//
+t x
+d
+: x
+s/.*\^ *\^ *\(.*\)/\1;/
+t y
+d
+: y
+p
+x
+D' ${temp}
 }
 
 ## main
diff --git a/libguile/snarf.h b/libguile/snarf.h
index 9bb998e..7d22a36 100644
--- a/libguile/snarf.h
+++ b/libguile/snarf.h
@@ -53,11 +53,17 @@
  * The SCM_SNARF_INIT text goes into the corresponding .x file
  * up through the first occurrence of SCM_SNARF_DOC_START on that
  * line, if any.
+ *
+ * Some debugging options can cause the preprocessor to echo #define
+ * directives to its output. Keeping the snarfing markers on separate
+ * lines prevents guile-snarf from inadvertently snarfing the definition
+ * of SCM_SNARF_INIT if those options are in effect.
  */
 
 #ifdef SCM_MAGIC_SNARF_INITS
 # define SCM_SNARF_HERE(X)
-# define SCM_SNARF_INIT(X) ^^ X ^:^
+# define SCM_SNARF_INIT_PREFIX ^^
+# define SCM_SNARF_INIT(X) SCM_SNARF_INIT_PREFIX X ^:^
 # define SCM_SNARF_DOCS(TYPE, CNAME, FNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING)
 #else
 # ifdef SCM_MAGIC_SNARF_DOCS
diff --git a/test-suite/standalone/test-guile-snarf 
b/test-suite/standalone/test-guile-snarf
index 78d35ea..41a9dc6 100755
--- a/test-suite/standalone/test-guile-snarf
+++ b/test-suite/standalone/test-guile-snarf
@@ -18,3 +18,5 @@ snarf_test "  ^  ^  b  ^  :  ^  " "b;"
 snarf_test "c\n^^d^:^\ne" "d;"
 snarf_test "f^^g^:^h" "g;"
 snarf_test "^^i^:^j^^k^:^" "i;k;"
+snarf_test "l^^m" ""
+snarf_test "n^:^o" ""


hooks/post-receive
-- 
GNU Guile



reply via email to

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