Re: [xml] xmlHashAddEntry/xmlHashScan behaviour

On 10/31/2012 08:09, Daniel Veillard wrote:
On Wed, Oct 31, 2012 at 08:45:35AM +0300, Nikolay Sivov wrote:

Got a question on libxml2 hash implementation.
Let's say I want to have index access to hash data, so I call

xmlHashAddEntry for item1
xmlHashAddEntry for item2
xmlHashAddEntry for item3

Is it wrong assumption to expect xmlHashScan calling back exactly in
same order as I added these entries?
   It is a wrong assumption. You can't expect any specific
order back from xmlHashScan() callbacks.
Ok, thanks. I'll workaround that then. Btw, is it possible recently added hash randomization made this "more" visible? I mean I was lucky enough it seems that a very limited test case (of two entries, well I know),
worked with older version and now it fails from time to time.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]