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-12-1-g788


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-12-1-g7884975
Date: Mon, 06 Sep 2010 15:11:26 +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=7884975a890a461fb62178eeb3dfbb8b30b28ba2

The branch, master has been updated
       via  7884975a890a461fb62178eeb3dfbb8b30b28ba2 (commit)
      from  cb5a528382d9aaa349dc7234a4ce9c682a2e6837 (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 7884975a890a461fb62178eeb3dfbb8b30b28ba2
Author: Andy Wingo <address@hidden>
Date:   Mon Sep 6 13:58:13 2010 +0200

    fix to program-module
    
    * libguile/programs.c (scm_program_module): Fix an edge case in which
      this function returned non-modules. Thanks to José Antonio Ortega
      Ruiz, Caballero del Cálculo Lambda for the report.

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

Summary of changes:
 libguile/programs.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/libguile/programs.c b/libguile/programs.c
index 12baf68..3a14f65 100644
--- a/libguile/programs.c
+++ b/libguile/programs.c
@@ -150,10 +150,17 @@ SCM_DEFINE (scm_program_module, "program-module", 1, 0, 0,
            "")
 #define FUNC_NAME s_scm_program_module
 {
-  SCM objs;
+  SCM objs, mod;
   SCM_VALIDATE_PROGRAM (1, program);
   objs = SCM_PROGRAM_OBJTABLE (program);
-  return scm_is_true (objs) ? scm_c_vector_ref (objs, 0) : SCM_BOOL_F;
+  /* If a program is the result of compiling GLIL to assembly, then if
+     it has an objtable, the first entry will be a module.  But some
+     programs are hand-coded trampolines, like boot programs and
+     primitives and the like.  So if a program happens to have a
+     non-module in the first slot of the objtable, assume that it is
+     such a trampoline, and just return #f for the module.  */
+  mod = scm_is_true (objs) ? scm_c_vector_ref (objs, 0) : SCM_BOOL_F;
+  return SCM_MODULEP (mod) ? mod : SCM_BOOL_F;
 }
 #undef FUNC_NAME
 


hooks/post-receive
-- 
GNU Guile



reply via email to

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