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

 > [EMAIL PROTECTED] 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



_______________________________________________
lilypond-devel mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to