Skip to content

Commit

Permalink
Fix 0.4 renaming of rehash! (fixes #190)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Dec 21, 2014
1 parent d830040 commit 3c1296a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/JLD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions src/plain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit 3c1296a

Please sign in to comment.