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-5-43-g5c8


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-5-43-g5c8cefe
Date: Sat, 28 Nov 2009 14:14:17 +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=5c8cefe591d465af8d8eee9ca6edb98143107a73

The branch, master has been updated
       via  5c8cefe591d465af8d8eee9ca6edb98143107a73 (commit)
      from  49bb5bd30714af627ae78b0897ab05ba566e7c00 (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 5c8cefe591d465af8d8eee9ca6edb98143107a73
Author: Ludovic Courtès <address@hidden>
Date:   Sat Nov 28 15:11:31 2009 +0100

    Remove remaining uses of discouraged constructs.
    
    * libguile/frames.c, libguile/instructions.c, libguile/objcodes.c,
      libguile/programs.c, libguile/throw.c, libguile/vm-i-scheme.c,
      libguile/vm.c:  Replace uses of discouraged constructs by their
      current counterparts.

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

Summary of changes:
 libguile/frames.c       |    2 +-
 libguile/instructions.c |   16 +++++++++-------
 libguile/objcodes.c     |    2 +-
 libguile/programs.c     |    6 +++---
 libguile/throw.c        |    4 ++--
 libguile/vm-i-scheme.c  |   10 +++++-----
 libguile/vm.c           |    2 +-
 7 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/libguile/frames.c b/libguile/frames.c
index 39f78e0..c0d7d61 100644
--- a/libguile/frames.c
+++ b/libguile/frames.c
@@ -66,7 +66,7 @@ SCM_DEFINE (scm_vm_frame_p, "vm-frame?", 1, 0, 0,
            "")
 #define FUNC_NAME s_scm_vm_frame_p
 {
-  return SCM_BOOL (SCM_VM_FRAME_P (obj));
+  return scm_from_bool (SCM_VM_FRAME_P (obj));
 }
 #undef FUNC_NAME
 
diff --git a/libguile/instructions.c b/libguile/instructions.c
index 04180e5..c870b31 100644
--- a/libguile/instructions.c
+++ b/libguile/instructions.c
@@ -83,17 +83,19 @@ scm_lookup_instruction_by_name (SCM name)
   struct scm_instruction *table = fetch_instruction_table ();
   SCM op;
 
-  if (SCM_UNLIKELY (SCM_FALSEP (instructions_by_name)))
-    { 
-      int i;
-      instructions_by_name = scm_permanent_object
-        (scm_make_hash_table (SCM_I_MAKINUM (SCM_VM_NUM_INSTRUCTIONS)));
+  if (SCM_UNLIKELY (scm_is_false (instructions_by_name)))
+    {
+      unsigned int i;
+
+      instructions_by_name =
+        scm_make_hash_table (SCM_I_MAKINUM (SCM_VM_NUM_INSTRUCTIONS));
+
       for (i = 0; i < SCM_VM_NUM_INSTRUCTIONS; i++)
         if (scm_is_true (table[i].symname))
           scm_hashq_set_x (instructions_by_name, table[i].symname,
                            SCM_I_MAKINUM (i));
     }
-  
+
   op = scm_hashq_ref (instructions_by_name, name, SCM_UNDEFINED);
   if (SCM_I_INUMP (op))
     return &table[SCM_I_INUM (op)];
@@ -124,7 +126,7 @@ SCM_DEFINE (scm_instruction_p, "instruction?", 1, 0, 0,
            "")
 #define FUNC_NAME s_scm_instruction_p
 {
-  return SCM_BOOL (scm_lookup_instruction_by_name (obj));
+  return scm_from_bool (scm_lookup_instruction_by_name (obj) != NULL);
 }
 #undef FUNC_NAME
 
diff --git a/libguile/objcodes.c b/libguile/objcodes.c
index de3a308..1b896df 100644
--- a/libguile/objcodes.c
+++ b/libguile/objcodes.c
@@ -145,7 +145,7 @@ SCM_DEFINE (scm_objcode_p, "objcode?", 1, 0, 0,
            "")
 #define FUNC_NAME s_scm_objcode_p
 {
-  return SCM_BOOL (SCM_OBJCODE_P (obj));
+  return scm_from_bool (SCM_OBJCODE_P (obj));
 }
 #undef FUNC_NAME
 
diff --git a/libguile/programs.c b/libguile/programs.c
index 646443a..7736ea5 100644
--- a/libguile/programs.c
+++ b/libguile/programs.c
@@ -58,12 +58,12 @@ scm_i_program_print (SCM program, SCM port, scm_print_state 
*pstate)
 {
   static int print_error = 0;
 
-  if (SCM_FALSEP (write_program) && scm_module_system_booted_p)
+  if (scm_is_false (write_program) && scm_module_system_booted_p)
     write_program = scm_module_local_variable
       (scm_c_resolve_module ("system vm program"),
        scm_from_locale_symbol ("write-program"));
   
-  if (SCM_FALSEP (write_program) || print_error)
+  if (scm_is_false (write_program) || print_error)
     {
       scm_puts ("#<program ", port);
       scm_uintprint (SCM_CELL_WORD_1 (program), 16, port);
@@ -87,7 +87,7 @@ SCM_DEFINE (scm_program_p, "program?", 1, 0, 0,
            "")
 #define FUNC_NAME s_scm_program_p
 {
-  return SCM_BOOL (SCM_PROGRAM_P (obj));
+  return scm_from_bool (SCM_PROGRAM_P (obj));
 }
 #undef FUNC_NAME
 
diff --git a/libguile/throw.c b/libguile/throw.c
index 07d215f..2217c95 100644
--- a/libguile/throw.c
+++ b/libguile/throw.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006, 2008 Free 
Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006, 2008, 2009 
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
@@ -177,7 +177,7 @@ scm_c_catch (SCM tag,
   struct pre_unwind_data pre_unwind;
 
   vm = scm_the_vm ();
-  if (SCM_NFALSEP (vm))
+  if (scm_is_true (vm))
     {
       sp = SCM_VM_DATA (vm)->sp;
       fp = SCM_VM_DATA (vm)->fp;
diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c
index 52f5b11..c9b40ee 100644
--- a/libguile/vm-i-scheme.c
+++ b/libguile/vm-i-scheme.c
@@ -44,13 +44,13 @@ VM_DEFINE_FUNCTION (101, not_not, "not-not", 1)
 VM_DEFINE_FUNCTION (102, eq, "eq?", 2)
 {
   ARGS2 (x, y);
-  RETURN (scm_from_bool (SCM_EQ_P (x, y)));
+  RETURN (scm_from_bool (scm_is_eq (x, y)));
 }
 
 VM_DEFINE_FUNCTION (103, not_eq, "not-eq?", 2)
 {
   ARGS2 (x, y);
-  RETURN (scm_from_bool (!SCM_EQ_P (x, y)));
+  RETURN (scm_from_bool (!scm_is_eq (x, y)));
 }
 
 VM_DEFINE_FUNCTION (104, nullp, "null?", 1)
@@ -68,7 +68,7 @@ VM_DEFINE_FUNCTION (105, not_nullp, "not-null?", 1)
 VM_DEFINE_FUNCTION (106, eqv, "eqv?", 2)
 {
   ARGS2 (x, y);
-  if (SCM_EQ_P (x, y))
+  if (scm_is_eq (x, y))
     RETURN (SCM_BOOL_T);
   if (SCM_IMP (x) || SCM_IMP (y))
     RETURN (SCM_BOOL_F);
@@ -79,7 +79,7 @@ VM_DEFINE_FUNCTION (106, eqv, "eqv?", 2)
 VM_DEFINE_FUNCTION (107, equal, "equal?", 2)
 {
   ARGS2 (x, y);
-  if (SCM_EQ_P (x, y))
+  if (scm_is_eq (x, y))
     RETURN (SCM_BOOL_T);
   if (SCM_IMP (x) || SCM_IMP (y))
     RETURN (SCM_BOOL_F);
@@ -90,7 +90,7 @@ VM_DEFINE_FUNCTION (107, equal, "equal?", 2)
 VM_DEFINE_FUNCTION (108, pairp, "pair?", 1)
 {
   ARGS1 (x);
-  RETURN (scm_from_bool (SCM_CONSP (x)));
+  RETURN (scm_from_bool (scm_is_pair (x)));
 }
 
 VM_DEFINE_FUNCTION (109, listp, "list?", 1)
diff --git a/libguile/vm.c b/libguile/vm.c
index 2262aa2..209408b 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -254,7 +254,7 @@ resolve_variable (SCM what, SCM program_module)
       mod = scm_resolve_module (SCM_CAR (what));
       if (scm_is_true (SCM_CADDR (what)))
         mod = scm_module_public_interface (mod);
-      if (SCM_FALSEP (mod))
+      if (scm_is_false (mod))
         scm_misc_error (NULL, "no such module: ~S",
                         scm_list_1 (SCM_CAR (what)));
       /* might longjmp */


hooks/post-receive
-- 
GNU Guile




reply via email to

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