Skip to content

Commit

Permalink
Correct H50get_info deprecation for earlier releases (#510)
Browse files Browse the repository at this point in the history
* Update before_script in OSX travis to forcibly link gcc

Otherwise we obtain the following linking failure:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/c++
Target /usr/local/include/c++
already exists. You may want to remove it:
  rm '/usr/local/include/c++'
  To force the link and overwrite all conflicting files:
    brew link --overwrite gcc
    To list all files that would be deleted:
      brew link --overwrite --dry-run gcc
      Possible conflicting files are:
      /usr/local/include/c++ ->
      /usr/local/Caskroom/oclint/0.13.1,17.4.0/oclint-0.13.1/include/c++

* Correct H50get_info deprecation for earlier releases

This function was renamed/deprecated in hdf5 releases newer than 10.2.
Here we update the function to map to the old realase behavior for the
latest hdf5 versions.
  • Loading branch information
musm committed Sep 4, 2018
1 parent de6863a commit 702743b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/HDF5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ for (jlname, h5name, outtype, argtypes, argsyms, msg) in
(:h5f_get_vfd_handle, :H5Fget_vfd_handle, Herr, (Hid, Hid, Ptr{Ptr{Cint}}), (:file_id, :fapl_id, :file_handle), "Error getting VFD handle"),
(:h5g_close, :H5Gclose, Herr, (Hid,), (:group_id,), "Error closing group"),
(:h5g_get_info, :H5Gget_info, Herr, (Hid, Ptr{H5Ginfo}), (:group_id, :buf), "Error getting group info"),
(:h5o_get_info, :H5Oget_info, Herr, (Hid, Ptr{H5Oinfo}), (:object_id, :buf), "Error getting object info"),
(:h5o_get_info, :H5Oget_info1, Herr, (Hid, Ptr{H5Oinfo}), (:object_id, :buf), "Error getting object info"),
(:h5o_close, :H5Oclose, Herr, (Hid,), (:object_id,), "Error closing object"),
(:h5p_close, :H5Pclose, Herr, (Hid,), (:id,), "Error closing property list"),
(:h5p_get_dxpl_mpio, :H5Pget_dxpl_mpio, Herr, (Hid, Ptr{Cint}), (:dxpl_id, :xfer_mode), "Error getting MPIO transfer mode"),
Expand Down Expand Up @@ -2114,6 +2114,11 @@ for (jlname, h5name, outtype, argtypes, argsyms, msg) in
(:h5t_set_size, :H5Tset_size, Herr, (Hid, Csize_t), (:dtype_id, :sz), "Error setting size of datatype"),
)

# emulate 1.8 and 1.10 release interface (new release should use HF0get_info2 or use the macro mapping H5Oget_info)
if h5name == :H5Oget_info1 && libversion <= v"1.10.2"
h5name = :H5Oget_info
end

ex_dec = funcdecexpr(jlname, length(argtypes), argsyms)
library = startswith(string(h5name), "H5DO") ? libhdf5_hl : libhdf5
if isempty(library)
Expand Down

0 comments on commit 702743b

Please sign in to comment.