[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #7976] Make PPKG_ADD and PKG_DEL see both
From: |
Olaf Till |
Subject: |
[Octave-patch-tracker] [patch #7976] Make PPKG_ADD and PKG_DEL see both m-file and oct-file directories of a package (2nd post) |
Date: |
Fri, 22 Mar 2013 07:40:15 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121207 Iceweasel/3.5.16 (like Firefox/3.5.16) |
Follow-up Comment #3, patch #7976 (project octave):
As for the architecture issue, as I see it for the case of adding paths:
1st level: functions (without '::do_') defined in load-path.h, taking care
only of instantiation;
2nd level: most functions with '::do_' in load-path.cc;
3rd level: ::do_add () in load-path.cc.
3rd level does actual path adding. But it also calls the add_hook.
2nd level calls 3rd level for path adding. But some functions in 2nd level
want to call add_hook in their own way. So they have to temporarily set
add_hook to zero and protect it while calling 3rd level. Also, some functions
in 2nd level call 3rd level indirectly over a further 2nd level function
(which has not much to do).
Suggestion: Let all 2nd level functions call 3rd level directly. Don't let 3rd
level call the add_hook. This spares disabling it in the 2nd level. Let all
2nd level functions call the add_hook themselves; the only function which
currently doesn't is ::do_append.
For the case of removing paths it's similar, but in one case 1st level
('remove()') calles 3rd level (::do_remove) directly. So for a change analog
to adding paths one would have to introduce a short new function for the 2nd
level here.
As for the choice of std::vector, it was because elements are only added to
the end, which should be more efficient than with std::list.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?7976>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/