diff --git a/docs/src/api_bindings.md b/docs/src/api_bindings.md index c9da0d79d..bf21404db 100644 --- a/docs/src/api_bindings.md +++ b/docs/src/api_bindings.md @@ -214,6 +214,7 @@ h5t_commit(loc_id::hid_t, name::Ptr{UInt8}, dtype_id::hid_t, lcpl_id::hid_t, tcp h5t_committed(dtype_id::hid_t) h5t_copy(dtype_id::hid_t) h5t_create(class_id::Cint, sz::Csize_t) +h5t_enum_insert(dtype_id::hid_t, name::Cstring, value::Ptr{Cvoid}) h5t_equal(dtype_id1::hid_t, dtype_id2::hid_t) h5t_get_array_dims(dtype_id::hid_t, dims::Ptr{hsize_t}) h5t_get_array_ndims(dtype_id::hid_t) diff --git a/gen/api_defs.jl b/gen/api_defs.jl index 223414913..076c462b6 100644 --- a/gen/api_defs.jl +++ b/gen/api_defs.jl @@ -225,6 +225,7 @@ @bind h5t_commit(loc_id::hid_t, name::Ptr{UInt8}, dtype_id::hid_t, lcpl_id::hid_t, tcpl_id::hid_t, tapl_id::hid_t)::herr_t "Error committing type" @bind h5t_copy(dtype_id::hid_t)::hid_t "Error copying datatype" @bind h5t_create(class_id::Cint, sz::Csize_t)::hid_t error("Error creating datatype of id ", class_id) +@bind h5t_enum_insert(dtype_id::hid_t, name::Cstring, value::Ptr{Cvoid})::herr_t error("Error adding ", name, " to enum datatype") @bind h5t_equal(dtype_id1::hid_t, dtype_id2::hid_t)::hid_t "Error checking datatype equality" @bind h5t_get_array_dims(dtype_id::hid_t, dims::Ptr{hsize_t})::Cint "Error getting dimensions of array" @bind h5t_get_array_ndims(dtype_id::hid_t)::Cint "Error getting ndims of array" diff --git a/src/api.jl b/src/api.jl index eb4b1b452..0c7d4ea54 100644 --- a/src/api.jl +++ b/src/api.jl @@ -884,6 +884,12 @@ function h5t_create(class_id, sz) return var"#status#" end +function h5t_enum_insert(dtype_id, name, value) + var"#status#" = ccall((:H5Tenum_insert, libhdf5), herr_t, (hid_t, Cstring, Ptr{Cvoid}), dtype_id, name, value) + var"#status#" < 0 && error("Error adding ", name, " to enum datatype") + return nothing +end + function h5t_equal(dtype_id1, dtype_id2) var"#status#" = ccall((:H5Tequal, libhdf5), hid_t, (hid_t, hid_t), dtype_id1, dtype_id2) var"#status#" < 0 && error("Error checking datatype equality")