|
From: | Han-Wen Nienhuys |
Subject: | Re: The life of a Grob |
Date: | Sun, 17 Sep 2006 01:20:01 +0200 |
User-agent: | Thunderbird 1.5.0.7 (X11/20060913) |
Joe Neeman wrote:
On Sat, 2006-09-16 at 16:29 +0200, Han-Wen Nienhuys wrote:Some comments:* can you add another macro layer, so __LINE__ and __FILE__ aren't sprinkled around in the code? For good measure, you could also add __FUNCTION__ .How about something like the attached patch? I "overload" get_property so that it can take a SCM directly. Then I can replace every internal_get_property with get_property.
Clever! This means that we can do away with the whole internal_FOO business, right? (also for some other functions, I expect.)
Can you prepare a patch that removes all the internal_XXX ?
this protection should not be necessary: as self_scm is passed as Stack variable it will be GC protected.+ protect (); + if (ly_is_procedure (modification_callback)) + scm_apply_0 (modification_callback, + scm_list_n (self_scm (), scm_makfrom0str (file), scm_from_int (line), + sym, v, SCM_UNDEFINED)); + unprotect ();I was getting segfaults in scm_gc_mark and this magically solved it. Being in dirty hack mode, I didn't investigate further. But you're right.
ok, but to get this in lily, we have to get it out of dirty hack mode. -- Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com
[Prev in Thread] | Current Thread | [Next in Thread] |