guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-7-61-g60b


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-7-61-g60b6a84
Date: Sat, 13 Feb 2010 23:34:41 +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=60b6a84f0f2d8d43491835a518463f4a8273bf87

The branch, master has been updated
       via  60b6a84f0f2d8d43491835a518463f4a8273bf87 (commit)
       via  4adf9a7e2750593e444a2c7d950e194294242896 (commit)
       via  acbccb0c834e3d28d14c60c98c730969edcdfbcc (commit)
      from  524aa8ae6830d0f471f0c86431d5da87c8a0a534 (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 60b6a84f0f2d8d43491835a518463f4a8273bf87
Author: Thien-Thi Nguyen <address@hidden>
Date:   Tue Feb 9 14:29:36 2010 +0100

    Document trailing whitespace policy.
    
    * HACKING (Coding standards): Delete trailing whitespace.
    Add blurb documenting trailing whitespace policy.
    
    Signed-off-by: Thien-Thi Nguyen <address@hidden>
    Signed-off-by: Ludovic Courtès <address@hidden>

commit 4adf9a7e2750593e444a2c7d950e194294242896
Author: Ludovic Courtès <address@hidden>
Date:   Sat Feb 13 23:50:06 2010 +0100

    Document the maximum number of arguments for a subr.
    
    * doc/ref/api-procedures.texi (Primitive Procedures): Specify the
      maximum number of arguments.  Patch by address@hidden

commit acbccb0c834e3d28d14c60c98c730969edcdfbcc
Author: Ludovic Courtès <address@hidden>
Date:   Sat Feb 13 19:33:51 2010 +0100

    Reinstate `scm_protects', for backward compatibility.
    
    Partly reverts e7efe8e793fa51ea898aea4477939c598b3e9fac ("decruftify
    scm_sys_protects").
    
    * libguile/gc.c (protects): Rename to...
      (scm_protects): ... this.
    
    * libguile/gc.h (scm_protects): Add declaration.

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

Summary of changes:
 HACKING                     |    5 ++++-
 doc/ref/api-procedures.texi |    2 +-
 libguile/gc.c               |   15 +++++++++------
 libguile/gc.h               |    3 ++-
 4 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/HACKING b/HACKING
index ffe04a8..7463fe5 100644
--- a/HACKING
+++ b/HACKING
@@ -230,7 +230,7 @@ When deprecating a definition, always follow this procedure:
 
 - Write commit messages for functions written in C using the
 functions' C names, and write entries for functions written in Scheme
-using the functions' Scheme names.  For example, 
+using the functions' Scheme names.  For example,
 
   * foo.c: Moved scm_procedure_documentation from eval.c.
 
@@ -278,6 +278,9 @@ the list of years in the copyright notice at the top of the 
file.
 - When you get bug reports or patches from people, be sure to list
 them in THANKS.
 
+- Do not introduce trailing whitespace (and feel free to clean it up
+opportunistically, that is, if doing so is part of some other change).
+The goal is to reduce (and over time, eliminate) spurious diffs.
 
 Naming conventions =================================================
 
diff --git a/doc/ref/api-procedures.texi b/doc/ref/api-procedures.texi
index 4639881..535d059 100644
--- a/doc/ref/api-procedures.texi
+++ b/doc/ref/api-procedures.texi
@@ -112,7 +112,7 @@ the given @var{name} but no environment binding will be 
created.  The
 arguments @var{req}, @var{opt} and @var{rst} specify the number of
 required, optional and ``rest'' arguments respectively.  The total
 number of these arguments should match the actual number of arguments
-to @var{fcn}.  The number of rest arguments should be 0 or 1.
+to @var{fcn}, but may not exceed 10.  The number of rest arguments should be 0 
or 1.
 @code{scm_c_make_gsubr} returns a value of type @code{SCM} which is a
 ``handle'' for the procedure.
 @end deftypefun
diff --git a/libguile/gc.c b/libguile/gc.c
index 700f3a4..fc405f3 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -89,7 +89,10 @@ int scm_debug_cells_gc_interval = 0;
  */
 int scm_i_cell_validation_already_running ;
 
-static SCM protects;
+/* Hash table that keeps a reference to objects the user wants to protect from
+   garbage collection.  It could arguably be private but applications have come
+   to rely on it (e.g., Lilypond 2.13.9).  */
+SCM scm_protects;
 
 
 #if (SCM_DEBUG_CELL_ACCESSES == 1)
@@ -507,7 +510,7 @@ scm_gc_protect_object (SCM obj)
      critsec/mutex inconsistency here. */
   SCM_CRITICAL_SECTION_START;
 
-  handle = scm_hashq_create_handle_x (protects, obj, scm_from_int (0));
+  handle = scm_hashq_create_handle_x (scm_protects, obj, scm_from_int (0));
   SCM_SETCDR (handle, scm_sum (SCM_CDR (handle), scm_from_int (1)));
 
   protected_obj_count ++;
@@ -537,7 +540,7 @@ scm_gc_unprotect_object (SCM obj)
       abort ();
     }
  
-  handle = scm_hashq_get_handle (protects, obj);
+  handle = scm_hashq_get_handle (scm_protects, obj);
 
   if (scm_is_false (handle))
     {
@@ -548,7 +551,7 @@ scm_gc_unprotect_object (SCM obj)
     {
       SCM count = scm_difference (SCM_CDR (handle), scm_from_int (1));
       if (scm_is_eq (count, scm_from_int (0)))
-       scm_hashq_remove_x (protects, obj);
+       scm_hashq_remove_x (scm_protects, obj);
       else
        SCM_SETCDR (handle, count);
     }
@@ -636,7 +639,7 @@ scm_storage_prehistory ()
   /* GC_REGISTER_DISPLACEMENT (scm_tc3_unused); */
 
   /* Sanity check.  */
-  if (!GC_is_visible (&protects))
+  if (!GC_is_visible (&scm_protects))
     abort ();
 
   scm_c_hook_init (&scm_before_gc_c_hook, 0, SCM_C_HOOK_NORMAL);
@@ -651,7 +654,7 @@ scm_i_pthread_mutex_t scm_i_gc_admin_mutex = 
SCM_I_PTHREAD_MUTEX_INITIALIZER;
 void
 scm_init_gc_protect_object ()
 {
-  protects = scm_c_make_hash_table (31);
+  scm_protects = scm_c_make_hash_table (31);
 
 #if 0
   /* We can't have a cleanup handler since we have no thread to run it
diff --git a/libguile/gc.h b/libguile/gc.h
index 05b08af..8f05aab 100644
--- a/libguile/gc.h
+++ b/libguile/gc.h
@@ -3,7 +3,7 @@
 #ifndef SCM_GC_H
 #define SCM_GC_H
 
-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2007, 
2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2007, 
2008, 2009, 2010 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
@@ -237,6 +237,7 @@ SCM_API void scm_gc_register_root (SCM *p);
 SCM_API void scm_gc_unregister_root (SCM *p);
 SCM_API void scm_gc_register_roots (SCM *b, unsigned long n);
 SCM_API void scm_gc_unregister_roots (SCM *b, unsigned long n);
+SCM_API SCM scm_protects;
 SCM_INTERNAL void scm_storage_prehistory (void);
 SCM_INTERNAL void scm_init_gc_protect_object (void);
 SCM_INTERNAL void scm_init_gc (void);


hooks/post-receive
-- 
GNU Guile




reply via email to

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