From 3c1296adb62a0cb7a6e26747ce47720c061fcac2 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sun, 21 Dec 2014 05:46:13 -0600 Subject: [PATCH] Fix 0.4 renaming of rehash! (fixes #190) --- src/JLD.jl | 4 ++-- src/plain.jl | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/JLD.jl b/src/JLD.jl index 4732973ca..2429bda14 100644 --- a/src/JLD.jl +++ b/src/JLD.jl @@ -1010,8 +1010,8 @@ function __init__() global _runtime_properties _runtime_properties[1] = COMPACT_PROPERTIES - Base.rehash(_typedict, length(_typedict.keys)) - Base.rehash(BUILTIN_TYPES.dict, length(BUILTIN_TYPES.dict.keys)) + HDF5.rehash!(_typedict, length(_typedict.keys)) + HDF5.rehash!(BUILTIN_TYPES.dict, length(BUILTIN_TYPES.dict.keys)) nothing end diff --git a/src/plain.jl b/src/plain.jl index c65d22748..b3b3bd750 100644 --- a/src/plain.jl +++ b/src/plain.jl @@ -2261,6 +2261,12 @@ _attr_properties(path::UTF8String) = _runtime_properties[4] const DEFAULT_PROPERTIES = HDF5Properties(H5P_DEFAULT, false) +if VERSION < v"0.4.0-dev+2014" + rehash! = Base.rehash +else + rehash! = Base.rehash! +end + function __init__() init_libhdf5() register_blosc() @@ -2284,8 +2290,8 @@ function __init__() _runtime_properties[3] = ASCII_ATTRIBUTE_PROPERTIES _runtime_properties[4] = UTF8_ATTRIBUTE_PROPERTIES - Base.rehash(hdf5_type_map, length(hdf5_type_map.keys)) - Base.rehash(hdf5_prop_get_set, length(hdf5_prop_get_set.keys)) + rehash!(hdf5_type_map, length(hdf5_type_map.keys)) + rehash!(hdf5_prop_get_set, length(hdf5_prop_get_set.keys)) nothing end