From: hanwen Date: Sun, 14 Jul 2002 13:11:48 +0000 (+0000) Subject: geile fixes X-Git-Tag: release/1.5.71~152 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d452367922f83e0fcc9d0ad883c2e7f8613bbbd4;p=lilypond.git geile fixes --- diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index a27d776a97..8245965f3d 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -71,14 +71,14 @@ inline SCM scm_c_make_vector (int k, SCM val) { #define scm_done_free(x) #endif -#if GUILE_MINOR_VERSION < 7 -#define scm_gc_unregister_collectable_memory(a,b,c) scm_done_free(b) -#define scm_gc_register_collectable_memory(a,b,c) scm_done_malloc(b) - #ifndef SMOB_FREE_RETURN_VAL #define SMOB_FREE_RETURN_VAL(CL) 0 #endif + +#if GUILE_MINOR_VERSION < 7 +#define scm_gc_unregister_collectable_memory(a,b,c) scm_done_free(b) +#define scm_gc_register_collectable_memory(a,b,c) scm_done_malloc(b) #endif #include "direction.hh" diff --git a/lily/include/ly-smobs.icc b/lily/include/ly-smobs.icc index aa35f4c973..a2e418a4c4 100644 --- a/lily/include/ly-smobs.icc +++ b/lily/include/ly-smobs.icc @@ -30,6 +30,7 @@ ADD_SCM_INIT_FUNC (init_type_p_ ## CL, init_type_p_ ## CL) #endif + #define IMPLEMENT_SIMPLE_SMOBS(CL) \ scm_t_bits CL::smob_tag_; \ SCM \ @@ -64,7 +65,7 @@ CL::free_smob (SCM ses) \ CL * s = (CL*) SCM_CDR (ses); \ delete s; \ scm_gc_unregister_collectable_memory (s, sizeof (CL), #CL " smob"); \ - return 0;\ + return SMOB_FREE_RETURN_VAL(CL);\ }\ ADD_SCM_INIT_FUNC (CL, CL::init_smobs)