Re: _set_value bug (and a patch)

Brandon Long <[email protected]>
Newsgroups gmane.text.clearsilver.general
Organization Fiction L Networks
Message-ID <20070712015506.GA11262@bl1>
Sorry for the late response, I was hoping to get to this much sooner.

This looks fine with me, it'll be in 0.10.5 which I hope to get out this
week...

Brandon

On 05/28/07 Nikolai Kondrashov uttered the following other thing:
> 
> Hello, everyone!
> 
> It seems I have found a bug in the _set_value function, and again, related
> to symlinks (yes, I know symlink usage isn't recommended, but nevertheless).
> 
> If you try to set the value of some non-existing sub-node of the node which
> is a link, the interstitial nodes are created below this node and not below
> the node to which the link points, as one would expect.
> 
> Say, if you have following dataset:
> 
> a : b
> b {
>   c {
>   }
> }
> 
> 
> And try to call hdf_get_node(hdf, "a.c.d", &node) you will get following result:
> 
> a : b
> a {
>   c {
>     d {
>     }
>   }
> b {
>   c {
>   }
> }
> 
> Instead of the obvious:
> 
> a : b
> b {
>   c {
>     d {
>     }
>   }
> }
> 
> But if the "b.c.d" existed the hdf_get_node would work correctly.
> 
> I have attached a quick and dirty patch which seems to work, and also
> includes a small fix (which seems logical to me) for proper handling of the
> links in the interstitial nodes in case the hdf parameter is not the top node.
> 
> Thank you for your attention :)
> 
> Sincerely,
> Nick
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 



-- 
 "Some people have one-track gutters." -- Harlan Ellison
                                           http://www.fiction.net/blong/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.