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

Re: Hash seed breaks 5.8.1 binary API; fix suggested



Chip Salzenberg wrote:

I suggest we fix this problem in 5.8.2 (which should be released
quickly) in the following fashion:

  1. Decree that PL_hash_seed should forever and ever be zero.
     This will make 5.8.0 and 5.8.1 PERL_HASH() calculate the same
     value at all times.

  2. Create a new variable PL_new_hash_seed which is initialized with
     the methods currently used for PL_hash_seed.

  3. Add (or xor or whatever) PL_new_hash_seed with the user-provided
     hash value *inside* the functions that use hashes, *not* outside
     them.

Binary compatibility in perl is largely illusory - any number of minor Configure tweaks will break compatibility even within a single release. Personally I wouldn't bother with another release - after all, it's Open Source and you can always recompile, right?

I could start muttering about the generally cavalier attitude of Open Source to binary compatibility, but I'll try and bite my tongue. If binary compatibility matters that much we should provide proper binary versioning of interfaces. If we did that we could hide all this sort of stuff entirely and produce something that would work with both old and new code. However doing that in a cross-platform way is a Hard Problem.

Welcome to DLL Hell.

--
Alan Burlison
--



Reply to: