Skip to content

Commit d1fc2c4

Browse files
authored
Merge pull request #245 from mulimoen/feature/remove-1.13-support
Remove 1.13 support
2 parents 3f51ffb + 70f9703 commit d1fc2c4

21 files changed

+77
-81
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
### Added
66

7-
- Support for HDF5 version 1.13.0.
87
- Support for HDF5 version 1.14.0.
98
- Support field renaming via `#[hdf5(rename = "new_name")]` helper attribute.
109
- Add a `ByteReader` which implements `std::io::{Read, Seek}` for 1D `u8`

hdf5-sys/build.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl Version {
2929
}
3030

3131
pub fn parse(s: &str) -> Option<Self> {
32-
let re = Regex::new(r"^(1)\.(8|10|12|13|14)\.(\d\d?)(_\d+)?((-|.)(patch)?\d+)?$").ok()?;
32+
let re = Regex::new(r"^(1)\.(8|10|12|14)\.(\d\d?)(_\d+)?((-|.)(patch)?\d+)?$").ok()?;
3333
let captures = re.captures(s)?;
3434
Some(Self {
3535
major: captures.get(1).and_then(|c| c.as_str().parse::<u8>().ok())?,
@@ -656,11 +656,10 @@ impl Config {
656656
pub fn emit_cfg_flags(&self) {
657657
let version = self.header.version;
658658
assert!(version >= Version::new(1, 8, 4), "required HDF5 version: >=1.8.4");
659-
let mut vs: Vec<_> = (5..=21).map(|v| Version::new(1, 8, v)).collect(); // 1.8.[5-21]
660-
vs.extend((0..=8).map(|v| Version::new(1, 10, v))); // 1.10.[0-8]
659+
let mut vs: Vec<_> = (5..=21).map(|v| Version::new(1, 8, v)).collect(); // 1.8.[5-23]
660+
vs.extend((0..=8).map(|v| Version::new(1, 10, v))); // 1.10.[0-10]
661661
vs.extend((0..=2).map(|v| Version::new(1, 12, v))); // 1.12.[0-2]
662-
vs.extend((0..=0).map(|v| Version::new(1, 13, v))); // 1.13.[0-0]
663-
vs.extend((0..=0).map(|v| Version::new(1, 14, v))); // 1.14.[0-0]
662+
vs.extend((0..=1).map(|v| Version::new(1, 14, v))); // 1.14.[0-1]
664663
for v in vs.into_iter().filter(|&v| version >= v) {
665664
println!("cargo:rustc-cfg=feature=\"{}.{}.{}\"", v.major, v.minor, v.micro);
666665
println!("cargo:version_{}_{}_{}=1", v.major, v.minor, v.micro);

hdf5-sys/src/h5.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ use crate::internal_prelude::*;
99
pub type herr_t = c_int;
1010
pub type htri_t = c_int;
1111

12-
#[cfg(not(feature = "1.13.0"))]
12+
#[cfg(not(feature = "1.14.0"))]
1313
pub type hsize_t = c_ulonglong;
14-
#[cfg(feature = "1.13.0")]
14+
#[cfg(feature = "1.14.0")]
1515
pub type hsize_t = u64;
1616

17-
#[cfg(not(feature = "1.13.0"))]
17+
#[cfg(not(feature = "1.14.0"))]
1818
pub type hssize_t = c_longlong;
19-
#[cfg(feature = "1.13.0")]
19+
#[cfg(feature = "1.14.0")]
2020
pub type hssize_t = i64;
2121

2222
pub type haddr_t = u64;
2323

24-
#[cfg(any(all(feature = "1.10.0", have_stdbool_h), feature = "1.13.0"))]
24+
#[cfg(any(all(feature = "1.10.0", have_stdbool_h), feature = "1.14.0"))]
2525
pub type hbool_t = u8;
26-
#[cfg(not(any(all(feature = "1.10.0", have_stdbool_h), feature = "1.13.0")))]
26+
#[cfg(not(any(all(feature = "1.10.0", have_stdbool_h), feature = "1.14.0")))]
2727
pub type hbool_t = c_uint;
2828

2929
#[repr(C)]
@@ -116,10 +116,10 @@ extern "C" {
116116
) -> herr_t;
117117
}
118118

119-
#[cfg(feature = "1.13.0")]
119+
#[cfg(feature = "1.14.0")]
120120
type H5_atclose_func_t = Option<extern "C" fn(ctx: *mut c_void)>;
121121

122-
#[cfg(feature = "1.13.0")]
122+
#[cfg(feature = "1.14.0")]
123123
extern "C" {
124124
pub fn H5atclose(func: H5_atclose_func_t, ctx: *mut c_void) -> herr_t;
125125
pub fn H5is_library_terminating(is_terminating: *mut hbool_t) -> herr_t;

hdf5-sys/src/h5a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ extern "C" {
123123
) -> herr_t;
124124
}
125125

126-
#[cfg(feature = "1.13.0")]
126+
#[cfg(feature = "1.14.0")]
127127
extern "C" {
128128
pub fn H5Aclose_async(
129129
app_file: *const c_char, app_func: *const c_char, app_line: c_uint, attr_id: hid_t,

hdf5-sys/src/h5d.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,20 +287,18 @@ extern "C" {
287287
pub fn H5Dget_num_chunks(dset_id: hid_t, fspace_id: hid_t, nchunks: *mut hsize_t) -> herr_t;
288288
}
289289

290-
#[cfg(feature = "1.13.0")]
290+
#[cfg(feature = "1.14.0")]
291291
pub type H5D_chunk_iter_op_t = Option<
292292
extern "C" fn(
293293
offset: *const hsize_t,
294-
#[cfg(feature = "1.14.0")] filter_mask: c_uint,
295-
#[cfg(not(feature = "1.14.0"))] filter_mask: u32,
294+
filter_mask: c_uint,
296295
addr: haddr_t,
297-
#[cfg(not(feature = "1.14.0"))] nbytes: u32,
298-
#[cfg(feature = "1.14.0")] size: hsize_t,
296+
size: hsize_t,
299297
op_data: *mut c_void,
300298
) -> c_int,
301299
>;
302300

303-
#[cfg(feature = "1.13.0")]
301+
#[cfg(feature = "1.14.0")]
304302
extern "C" {
305303
pub fn H5Dchunk_iter(
306304
dset_id: hid_t, dxpl: hid_t, cb: H5D_chunk_iter_op_t, op_data: *mut c_void,

hdf5-sys/src/h5e.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ extern "C" {
131131
#[deprecated(note = "deprecated in HDF5 1.8.0")]
132132
pub fn H5Eget_minor(min: H5E_minor_t) -> *mut c_char;
133133

134-
#[cfg(feature = "1.13.0")]
134+
#[cfg(feature = "1.14.0")]
135135
pub fn H5Eappend_stack(
136136
dst_stack_id: hid_t, src_stack_id: hid_t, close_source_stack: hbool_t,
137137
) -> herr_t;
@@ -166,7 +166,7 @@ mod globals {
166166
extern_static!(H5E_RS, H5E_RS_g);
167167
extern_static!(H5E_HEAP, H5E_HEAP_g);
168168
extern_static!(H5E_OHDR, H5E_OHDR_g);
169-
#[cfg(not(feature = "1.13.0"))]
169+
#[cfg(not(feature = "1.14.0"))]
170170
extern_static!(H5E_ATOM, H5E_ATOM_g);
171171
extern_static!(H5E_ATTR, H5E_ATTR_g);
172172
extern_static!(H5E_NONE_MAJOR, H5E_NONE_MAJOR_g);
@@ -242,7 +242,7 @@ mod globals {
242242
extern_static!(H5E_BADFILE, H5E_BADFILE_g);
243243
extern_static!(H5E_TRUNCATED, H5E_TRUNCATED_g);
244244
extern_static!(H5E_MOUNT, H5E_MOUNT_g);
245-
#[cfg(not(feature = "1.13.0"))]
245+
#[cfg(not(feature = "1.14.0"))]
246246
extern_static!(H5E_BADATOM, H5E_BADATOM_g);
247247
extern_static!(H5E_BADGROUP, H5E_BADGROUP_g);
248248
extern_static!(H5E_CANTREGISTER, H5E_CANTREGISTER_g);
@@ -302,21 +302,21 @@ mod globals {
302302
extern_static!(H5E_CANTUNLOCKFILE, H5E_CANTUNLOCKFILE_g);
303303
#[cfg(feature = "1.12.1")]
304304
extern_static!(H5E_LIB, H5E_LIB_g);
305-
#[cfg(feature = "1.13.0")]
305+
#[cfg(feature = "1.14.0")]
306306
extern_static!(H5E_BADID, H5E_BADID_g);
307-
#[cfg(feature = "1.13.0")]
307+
#[cfg(feature = "1.14.0")]
308308
extern_static!(H5E_CANTCANCEL, H5E_CANTCANCEL_g);
309-
#[cfg(feature = "1.13.0")]
309+
#[cfg(feature = "1.14.0")]
310310
extern_static!(H5E_CANTFIND, H5E_CANTFIND_g);
311-
#[cfg(feature = "1.13.0")]
311+
#[cfg(feature = "1.14.0")]
312312
extern_static!(H5E_CANTPUT, H5E_CANTPUT_g);
313-
#[cfg(feature = "1.13.0")]
313+
#[cfg(feature = "1.14.0")]
314314
extern_static!(H5E_CANTWAIT, H5E_CANTWAIT_g);
315-
#[cfg(feature = "1.13.0")]
315+
#[cfg(feature = "1.14.0")]
316316
extern_static!(H5E_EVENTSET, H5E_EVENTSET_g);
317-
#[cfg(feature = "1.13.0")]
317+
#[cfg(feature = "1.14.0")]
318318
extern_static!(H5E_ID, H5E_ID_g);
319-
#[cfg(feature = "1.13.0")]
319+
#[cfg(feature = "1.14.0")]
320320
extern_static!(H5E_UNMOUNT, H5E_UNMOUNT_g);
321321
}
322322

@@ -348,7 +348,7 @@ mod globals {
348348
extern_static!(H5E_RS, __imp_H5E_RS_g);
349349
extern_static!(H5E_HEAP, __imp_H5E_HEAP_g);
350350
extern_static!(H5E_OHDR, __imp_H5E_OHDR_g);
351-
#[cfg(not(feature = "1.13.0"))]
351+
#[cfg(not(feature = "1.14.0"))]
352352
extern_static!(H5E_ATOM, __imp_H5E_ATOM_g);
353353
extern_static!(H5E_ATTR, __imp_H5E_ATTR_g);
354354
extern_static!(H5E_NONE_MAJOR, __imp_H5E_NONE_MAJOR_g);
@@ -424,7 +424,7 @@ mod globals {
424424
extern_static!(H5E_BADFILE, __imp_H5E_BADFILE_g);
425425
extern_static!(H5E_TRUNCATED, __imp_H5E_TRUNCATED_g);
426426
extern_static!(H5E_MOUNT, __imp_H5E_MOUNT_g);
427-
#[cfg(not(feature = "1.13.0"))]
427+
#[cfg(not(feature = "1.14.0"))]
428428
extern_static!(H5E_BADATOM, __imp_H5E_BADATOM_g);
429429
extern_static!(H5E_BADGROUP, __imp_H5E_BADGROUP_g);
430430
extern_static!(H5E_CANTREGISTER, __imp_H5E_CANTREGISTER_g);
@@ -484,20 +484,20 @@ mod globals {
484484
extern_static!(H5E_CANTUNLOCKFILE, __imp_H5E_CANTUNLOCKFILE_g);
485485
#[cfg(feature = "1.12.1")]
486486
extern_static!(H5E_LIB, __imp_H5E_LIB_g);
487-
#[cfg(feature = "1.13.0")]
487+
#[cfg(feature = "1.14.0")]
488488
extern_static!(H5E_BADID, __imp_H5E_BADID_g);
489-
#[cfg(feature = "1.13.0")]
489+
#[cfg(feature = "1.14.0")]
490490
extern_static!(H5E_CANTCANCEL, __imp_H5E_CANTCANCEL_g);
491-
#[cfg(feature = "1.13.0")]
491+
#[cfg(feature = "1.14.0")]
492492
extern_static!(H5E_CANTFIND, __imp_H5E_CANTFIND_g);
493-
#[cfg(feature = "1.13.0")]
493+
#[cfg(feature = "1.14.0")]
494494
extern_static!(H5E_CANTPUT, __imp_H5E_CANTPUT_g);
495-
#[cfg(feature = "1.13.0")]
495+
#[cfg(feature = "1.14.0")]
496496
extern_static!(H5E_CANTWAIT, __imp_H5E_CANTWAIT_g);
497-
#[cfg(feature = "1.13.0")]
497+
#[cfg(feature = "1.14.0")]
498498
extern_static!(H5E_EVENTSET, __imp_H5E_EVENTSET_g);
499-
#[cfg(feature = "1.13.0")]
499+
#[cfg(feature = "1.14.0")]
500500
extern_static!(H5E_ID, __imp_H5E_ID_g);
501-
#[cfg(feature = "1.13.0")]
501+
#[cfg(feature = "1.14.0")]
502502
extern_static!(H5E_UNMOUNT, __imp_H5E_UNMOUNT_g);
503503
}

hdf5-sys/src/h5f.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub enum H5F_libver_t {
128128
H5F_LIBVER_V110 = 2,
129129
#[cfg(feature = "1.12.0")]
130130
H5F_LIBVER_V112 = 3,
131-
#[cfg(feature = "1.13.0")]
131+
#[cfg(feature = "1.14.0")]
132132
H5F_LIBVER_V114 = 4,
133133
H5F_LIBVER_NBOUNDS,
134134
}
@@ -175,9 +175,9 @@ extern "C" {
175175
pub fn H5Fget_freespace(file_id: hid_t) -> hssize_t;
176176
pub fn H5Fget_filesize(file_id: hid_t, size: *mut hsize_t) -> herr_t;
177177
pub fn H5Fget_mdc_config(file_id: hid_t, config_ptr: *mut H5AC_cache_config_t) -> herr_t;
178-
#[cfg(not(feature = "1.13.0"))]
178+
#[cfg(not(feature = "1.14.0"))]
179179
pub fn H5Fset_mdc_config(file_id: hid_t, config_ptr: *mut H5AC_cache_config_t) -> herr_t;
180-
#[cfg(feature = "1.13.0")]
180+
#[cfg(feature = "1.14.0")]
181181
pub fn H5Fset_mdc_config(file_id: hid_t, config_ptr: *const H5AC_cache_config_t) -> herr_t;
182182
pub fn H5Fget_mdc_hit_rate(file_id: hid_t, hit_rate_ptr: *mut c_double) -> herr_t;
183183
pub fn H5Fget_mdc_size(
@@ -374,7 +374,7 @@ extern "C" {
374374
pub fn H5Fset_dset_no_attrs_hint(file_id: hid_t, minimize: hbool_t) -> herr_t;
375375
}
376376

377-
#[cfg(feature = "1.13.0")]
377+
#[cfg(feature = "1.14.0")]
378378
extern "C" {
379379
pub fn H5Fclose_async(
380380
app_file: *const c_char, app_func: *const c_char, app_line: c_uint, file_id: hid_t,

hdf5-sys/src/h5fd.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::internal_prelude::*;
88

99
use crate::h5f::{H5F_close_degree_t, H5F_mem_t};
1010

11-
#[cfg(not(feature = "1.13.0"))]
11+
#[cfg(not(feature = "1.14.0"))]
1212
pub const H5_HAVE_VFL: c_uint = 1;
1313

1414
pub const H5FD_VFD_DEFAULT: c_uint = 0;
@@ -125,12 +125,12 @@ pub type H5FD_class_value_t = c_int;
125125
#[repr(C)]
126126
#[derive(Debug, Copy, Clone)]
127127
pub struct H5FD_class_t {
128-
#[cfg(feature = "1.13.0")]
128+
#[cfg(feature = "1.14.0")]
129129
pub value: H5FD_class_value_t,
130130
pub name: *const c_char,
131131
pub maxaddr: haddr_t,
132132
pub fc_degree: H5F_close_degree_t,
133-
#[cfg(feature = "1.13.0")]
133+
#[cfg(feature = "1.14.0")]
134134
pub terminate: Option<extern "C" fn() -> herr_t>,
135135
pub sb_size: Option<extern "C" fn(file: *mut H5FD_t) -> hsize_t>,
136136
pub sb_encode:
@@ -214,9 +214,9 @@ pub struct H5FD_class_t {
214214
>,
215215
pub unlock:
216216
Option<extern "C" fn(file: *mut H5FD_t, oid: *mut c_uchar, last: hbool_t) -> herr_t>,
217-
#[cfg(feature = "1.13.0")]
217+
#[cfg(feature = "1.14.0")]
218218
pub del: Option<extern "C" fn(name: *const c_char, fapl: hid_t) -> herr_t>,
219-
#[cfg(feature = "1.13.0")]
219+
#[cfg(feature = "1.14.0")]
220220
pub ctl: Option<
221221
extern "C" fn(
222222
file: *mut H5FD_t,
@@ -387,7 +387,7 @@ extern "C" {
387387
pub fn H5FDunlock(file: *mut H5FD_t) -> herr_t;
388388
}
389389

390-
#[cfg(all(feature = "1.10.6", not(feature = "1.13.0")))]
390+
#[cfg(all(feature = "1.10.6", not(feature = "1.14.0")))]
391391
pub mod hdfs {
392392
use super::*;
393393
pub const H5FD__CURR_HDFS_FAPL_T_VERSION: c_uint = 1;
@@ -471,10 +471,10 @@ extern "C" {
471471
pub fn H5FDdriver_query(driver_id: hid_t, flags: *mut c_ulong) -> herr_t;
472472
}
473473

474-
#[cfg(feature = "1.13.0")]
474+
#[cfg(feature = "1.14.0")]
475475
type H5FD_perform_init_func_t = Option<extern "C" fn() -> hid_t>;
476476

477-
#[cfg(feature = "1.13.0")]
477+
#[cfg(feature = "1.14.0")]
478478
extern "C" {
479479
pub fn H5FDctl(
480480
file: *mut H5FD_t, op_cod: u64, flags: u64, input: *const c_void, output: *mut *mut c_void,

hdf5-sys/src/h5g.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pub struct H5G_stat_t {
138138
ohdr: H5O_stat_t,
139139
}
140140

141-
#[cfg(feature = "1.13.0")]
141+
#[cfg(feature = "1.14.0")]
142142
extern "C" {
143143
pub fn H5Gclose_async(
144144
app_file: *const c_char, app_func: *const c_char, app_line: c_uint, group_id: hid_t,

hdf5-sys/src/h5i.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub enum H5I_type_t {
2929
H5I_ERROR_STACK,
3030
#[cfg(feature = "1.12.0")]
3131
H5I_SPACE_SEL_ITER,
32-
#[cfg(feature = "1.13.0")]
32+
#[cfg(feature = "1.14.0")]
3333
H5I_EVENTSET,
3434
H5I_NTYPES,
3535
}
@@ -42,9 +42,9 @@ pub type hid_t = c_int;
4242

4343
pub const H5I_INVALID_HID: hid_t = -1;
4444

45-
#[cfg(not(feature = "1.13.0"))]
45+
#[cfg(not(feature = "1.14.0"))]
4646
pub type H5I_free_t = Option<extern "C" fn(arg1: *mut c_void) -> herr_t>;
47-
#[cfg(feature = "1.13.0")]
47+
#[cfg(feature = "1.14.0")]
4848
pub type H5I_free_t = Option<extern "C" fn(*mut c_void, *mut *mut c_void) -> herr_t>;
4949

5050
pub type H5I_search_func_t =
@@ -78,14 +78,14 @@ extern "C" {
7878
pub fn H5Iis_valid(id: hid_t) -> htri_t;
7979
}
8080

81-
#[cfg(feature = "1.13.0")]
81+
#[cfg(feature = "1.14.0")]
8282
pub type H5I_future_realize_func_t =
8383
Option<extern "C" fn(future_object: *mut c_void, actual_object_id: *mut hid_t) -> herr_t>;
8484

85-
#[cfg(feature = "1.13.0")]
85+
#[cfg(feature = "1.14.0")]
8686
pub type H5I_future_discard_func_t = Option<extern "C" fn(future_object: *mut c_void) -> herr_t>;
8787

88-
#[cfg(feature = "1.13.0")]
88+
#[cfg(feature = "1.14.0")]
8989
extern "C" {
9090
pub fn H5Iregister_future(
9191
type_: H5I_type_t, object: *const c_void, realize_cb: H5I_future_realize_func_t,

hdf5-sys/src/h5l.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ pub use self::{
336336
H5L_info2_t as H5L_info_t, H5L_iterate2_t as H5L_iterate_t, H5Literate2 as H5Literate,
337337
};
338338

339-
#[cfg(feature = "1.13.0")]
339+
#[cfg(feature = "1.14.0")]
340340
extern "C" {
341341
pub fn H5Lcreate_hard_async(
342342
app_file: *const c_char, app_func: *const c_char, app_line: c_uint, cur_loc_id: hid_t,

hdf5-sys/src/h5o.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ mod globals {
476476
extern_static!(H5O_TOKEN_UNDEF, __imp_H5O_TOKEN_UNDEF_g);
477477
}
478478

479-
#[cfg(feature = "1.13.0")]
479+
#[cfg(feature = "1.14.0")]
480480
extern "C" {
481481
pub fn H5Oclose_async(
482482
app_file: *const c_char, app_func: *const c_char, app_line: c_uint, object_id: hid_t,

hdf5-sys/src/h5p.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::h5o::H5O_mcdt_search_cb_t;
1717
#[cfg(feature = "1.10.1")]
1818
use crate::{h5ac::H5AC_cache_image_config_t, h5f::H5F_fspace_strategy_t};
1919

20-
#[cfg(feature = "1.13.0")]
20+
#[cfg(feature = "1.14.0")]
2121
use crate::{h5fd::H5FD_class_value_t, h5s::H5S_seloper_t};
2222

2323
pub const H5P_CRT_ORDER_TRACKED: c_uint = 0x0001;
@@ -792,7 +792,7 @@ extern "C" {
792792
pub fn H5Pset_vol(plist_id: hid_t, new_vol_id: hid_t, new_vol_id: *const c_void) -> herr_t;
793793
}
794794

795-
#[cfg(feature = "1.13.0")]
795+
#[cfg(feature = "1.14.0")]
796796
extern "C" {
797797
pub fn H5Pget_driver_config_str(
798798
fapl_id: hid_t, config_buf: *mut c_char, buf_size: size_t,

hdf5-sys/src/h5pl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mod hdf5_1_8_15 {
1212
H5PL_TYPE_FILTER = 0,
1313
#[cfg(feature = "1.12.0")]
1414
H5PL_TYPE_VOL,
15-
#[cfg(feature = "1.13.0")]
15+
#[cfg(feature = "1.14.0")]
1616
H5PL_TYPE_VFD,
1717
#[cfg(feature = "1.12.0")]
1818
H5PL_TYPE_NONE,

0 commit comments

Comments
 (0)