On Sat, Aug 9, 2008 at 11:07 AM, Raphaël Pinson <[EMAIL PROTECTED]> wrote:

>
>
> On Fri, Aug 8, 2008 at 11:55 PM, David Lutterkort <[EMAIL PROTECTED]>wrote:
>
>> On Fri, 2008-08-08 at 22:57 +0200, Raphaël Pinson wrote:
>> >
>> >
>> > On Fri, Aug 8, 2008 at 10:12 PM, David Lutterkort <[EMAIL PROTECTED]>
>> > wrote:
>>
>> >         Yes, I think that would be the cleanest solution: tree_insert
>> >         should
>> >         become
>> >
>> >                int tree_insert(struct tree **tree, const char *path,
>> >         const char *label,
>> >                                int before, struct path **node)
>>
>> Thinking about this more, this is pretty ugly. I'd prefer it if
>> aug_insert actually calls make_path and then passes that to tree_insert,
>> which sets the path to the newly created node before returning, so that
>> tree_insert ahs the signature
>>
>>        int tree_insert(struct tree **tree, struct path *path, const char
>> *label,
>>                        int before)
>>
>
>
> I'm not sure to understand that part, I'll have to look at the code on
> monday.
>
>


Hmmm ok, let me see if I got it. Instead of sending a const char *path to
tree_insert, you would send a struct path *path, which was created by
aug_insert (or the other function calling tree_insert) and tree_insert would
then return the path to the newly created node in *path, so aug_insert could
call format_path on it (or call the function to write to
/augeas/tree/least_created). Is that it?




Raphaël
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to