lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #{ $music #}


From: Nicolas Sceaux
Subject: Re: #{ $music #}
Date: Fri, 14 May 2004 10:31:03 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Fri, 14 May 2004 09:03:33 +0200, Han-Wen a dit : 

 > address@hidden writes:
 >> +LY_DEFINE (ly_clone_parser, "ly:clone-parser",
 >> +           1, 0, 0, 
 >> +           (SCM parser_smob),
 >> +           "Return a clone of PARSER_SMOB.")
 >> +{
 >> +  My_lily_parser *parser = unsmob_my_lily_parser (parser_smob);
 >> +  My_lily_parser *clone = new My_lily_parser (*parser);
 >> +  return clone->self_scm ();
 >> +}

 > nitpick: you should do

 >   return scm_gc_unprotect_object (clone->self_scm ());

OK. I've seen several occurences of this pattern in the source code,
but wasn't sure of what it meant, for I didn't find the definition of
scm_gc_unprotect_object in the guile reference manual. Does it means
that the object is made garbage-collectable? (for an unknown reason my
first intuition was the opposite.)

nicolas





reply via email to

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