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=655aadf4b09c40f4c7854e4325e8809fcb7cb36b The branch, master has been updated via 655aadf4b09c40f4c7854e4325e8809fcb7cb36b (commit) via 0eedfa5cab71cef05e2b9f06d6286d3b8f04ca59 (commit) via 4e974a1a6d2c0d749bc87bf1b77a519da3e1fe85 (commit) from 4f08d0b50fffd3d35ea5be430e6ae4251ea53baa (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 655aadf4b09c40f4c7854e4325e8809fcb7cb36b Author: Andy Wingo <[email protected]> Date: Tue Mar 30 10:28:51 2010 +0200 going through scm_shell not necessary to get autocompilation * libguile/load.c (scm_init_load): Initialize %load-should-autocompile from the environment variable here, so that apps that don't go through scm_shell get autocompilation. * libguile/script.c (scm_compile_shell_switches): Explicitly enable or disable autocompilation here, if told to do so. commit 0eedfa5cab71cef05e2b9f06d6286d3b8f04ca59 Author: Andy Wingo <[email protected]> Date: Mon Mar 29 22:02:42 2010 +0200 fix bug in scm_must_free * libguile/gc-malloc.c: Update a comment. (scm_must_free): Must be able to free memory allocated with scm_must_malloc, and thus must be GC_FREE, not free. commit 4e974a1a6d2c0d749bc87bf1b77a519da3e1fe85 Author: Andy Wingo <[email protected]> Date: Mon Mar 29 21:51:07 2010 +0200 remove out-of-date comment in scm_gc_malloc * libguile/gc-malloc.c (scm_gc_malloc): Remove out-of-date comment. ----------------------------------------------------------------------- Summary of changes: libguile/gc-malloc.c | 29 ++++++----------------------- libguile/load.c | 10 +++++++--- libguile/script.c | 8 +++----- 3 files changed, 16 insertions(+), 31 deletions(-) diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c index 9f6c376..e409b6e 100644 --- a/libguile/gc-malloc.c +++ b/libguile/gc-malloc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2008, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 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 @@ -180,17 +180,6 @@ scm_gc_malloc_pointerless (size_t size, const char *what) void * scm_gc_malloc (size_t size, const char *what) { - /* - The straightforward implementation below has the problem - that it might call the GC twice, once in scm_malloc and then - again in scm_gc_register_collectable_memory. We don't really - want the second GC since it will not find new garbage. - - Note: this is a theoretical peeve. In reality, malloc () never - returns NULL. Usually, memory is overcommitted, and when you try - to write it the program is killed with signal 11. --hwn - */ - void *ptr; if (size == 0) @@ -255,17 +244,11 @@ scm_gc_strdup (const char *str, const char *what) * scm_done_free * * These functions provide services comparable to malloc, realloc, and - * free. They should be used when allocating memory that will be under - * control of the garbage collector, i.e., if the memory may be freed - * during garbage collection. + * free. * - * They are deprecated because they weren't really used the way - * outlined above, and making sure to return the right amount from - * smob free routines was sometimes difficult when dealing with nested - * data structures. We basically want everybody to review their code - * and use the more symmetrical scm_gc_malloc/scm_gc_free functions - * instead. In some cases, where scm_must_malloc has been used - * incorrectly (i.e. for non-GC-able memory), use scm_malloc/free. + * There has been a fair amount of confusion around the use of these functions; + * see "Memory Blocks" in the manual. They are totally unnecessary in 2.0 given + * the Boehm GC. */ void * @@ -323,7 +306,7 @@ scm_must_free (void *obj) scm_malloc_unregister (obj); #endif - free (obj); + GC_FREE (obj); } #undef FUNC_NAME diff --git a/libguile/load.c b/libguile/load.c index abd5b1c..c64c746 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -27,6 +27,7 @@ #include <stdio.h> #include "libguile/_scm.h" +#include "libguile/private-gc.h" /* scm_getenv_int */ #include "libguile/libpath.h" #include "libguile/fports.h" #include "libguile/read.h" @@ -901,9 +902,12 @@ scm_init_load () scm_loc_compile_fallback_path = SCM_VARIABLE_LOC (scm_c_define ("%compile-fallback-path", SCM_BOOL_F)); - scm_loc_load_should_autocompile - = SCM_VARIABLE_LOC (scm_c_define ("%load-should-autocompile", SCM_BOOL_F)); - + { + SCM autocomp = scm_from_bool (scm_getenv_int ("GUILE_AUTO_COMPILE", 1)); + scm_loc_load_should_autocompile + = SCM_VARIABLE_LOC (scm_c_define ("%load-should-autocompile", autocomp)); + } + the_reader = scm_make_fluid (); scm_fluid_set_x (the_reader, SCM_BOOL_F); scm_c_define("current-reader", the_reader); diff --git a/libguile/script.c b/libguile/script.c index 2f24957..3ba656f 100644 --- a/libguile/script.c +++ b/libguile/script.c @@ -720,13 +720,11 @@ scm_compile_shell_switches (int argc, char **argv) tail = scm_cons (scm_cons (sym_load_user_init, SCM_EOL), tail); } - /* If GUILE_AUTO_COMPILE is not set and no args are given, default to - autocompilation. */ - if (turn_on_autocompile || (scm_getenv_int ("GUILE_AUTO_COMPILE", 1) - && !dont_turn_on_autocompile)) + /* If we are given an autocompilation arg, set %load-should-autocompile. */ + if (turn_on_autocompile || dont_turn_on_autocompile) { tail = scm_cons (scm_list_3 (sym_set_x, sym_sys_load_should_autocompile, - SCM_BOOL_T), + scm_from_bool (turn_on_autocompile)), tail); } hooks/post-receive -- GNU Guile
