Thanks guys. In our case, we are just enumerating the hashtable created for all the derived types for an abstract type (complexTypeRegistry). It's true that we really don't care about the orders we get for the derived types the first time we set up our jobs, but once we created our jobs, we do not expect this order to change in later versions of Xerces, nor do we expect the order to change in a different platform. I would think this is a reasonable expections. Also, since we have applications run on multiple platforms and move jobs around, this is import to us.
Thanks! Gordon ________________________________ From: Boris Kolpackov <[email protected]> To: [email protected] Sent: Thu, February 4, 2010 4:13:15 AM Subject: Re: RefHashTableOfEnumerator returns me elements in different order for different platforms Hi Gordon, Gordon Brown <[email protected]> writes: > It is clear now that the hash function inXMLString.cpp is re-implemented. It is not really re-implemented.. Rather we use XMLSize_t instead of unsigned int to hold the result. > This is causing big problems. You are the first person to mentioned this so I think it is more accurate to say it is causing problems for some applications (which, BTW, rely on something that was never explicitly guaranteed). > If I bring back the old hash function, will it cause other problems? If you patch Xerces-C++ to use unsigned int to calculate the hash value, you will get the old behavior though the hashing may not be optimal on 64-bit platforms since only 32 bit will be used. Boris -- Boris Kolpackov, Code Synthesis http://codesynthesis.com/~boris/blog Open-source XML data binding for C++ http://codesynthesis.com/products/xsd XML data binding for embedded systems http://codesynthesis.com/products/xsde Command line interface to C++ compiler http://codesynthesis.com/projects/cli
