X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fsmobs.cc;h=d1bea956d40375ac2fc8497c79355a0dd59bd899;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=a4c88fe58b12f276406dcae0a9d5b78d4b04d343;hpb=ade2bb7da653fbd9d670590afd67376fe69c59dd;p=lilypond.git diff --git a/lily/smobs.cc b/lily/smobs.cc index a4c88fe58b..d1bea956d4 100644 --- a/lily/smobs.cc +++ b/lily/smobs.cc @@ -1,9 +1,20 @@ /* - smobs.cc -- implement Smob protection + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2015 Han-Wen Nienhuys - (c) 2005--2007 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "smobs.hh" @@ -22,12 +33,12 @@ init_smob_protection () ADD_SCM_INIT_FUNC (init_smob_protection, init_smob_protection); LY_DEFINE (ly_smob_protects, "ly:smob-protects", - 0, 0, 0, (), - "Return lily's internal smob protection list") + 0, 0, 0, (), + "Return LilyPond's internal smob protection list.") { return scm_is_pair (smob_protection_list) - ? scm_cdr (smob_protection_list) - : SCM_EOL; + ? scm_cdr (smob_protection_list) + : SCM_EOL; } void @@ -41,10 +52,10 @@ protect_smob (SCM smob, SCM *prot_cons) } SCM prot = scm_cons (smob, s); scm_set_cdr_x (smob_protection_list, - prot); + prot); *prot_cons = prot; #else - (void) prot_cons; + (void) prot_cons; scm_gc_protect_object (smob); #endif } @@ -53,7 +64,7 @@ void unprotect_smob (SCM smob, SCM *prot_cons) { #if 1 - (void) prot_cons; + (void) prot_cons; scm_gc_unprotect_object (smob); #else SCM next = scm_cdr (*prot_cons); @@ -64,9 +75,9 @@ unprotect_smob (SCM smob, SCM *prot_cons) { scm_set_car_x (*prot_cons, SCM_BOOL_F); while (scm_is_pair (next) - && scm_car (next) == SCM_BOOL_F) + && scm_car (next) == SCM_BOOL_F) - next = scm_cdr (next); + next = scm_cdr (next); scm_set_cdr_x (*prot_cons, next); }