Skip to content

Commit

Permalink
Merge pull request #157 from magnusuMET/feature/options-flags
Browse files Browse the repository at this point in the history
Add flags to Options
  • Loading branch information
magnusuMET authored Aug 20, 2024
2 parents 9e5ccdb + 5b7f5b0 commit 7e4d2ec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion netcdf-sys/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,13 @@ pub const NC_MPIPOSIX: c_int = {

#[cfg(feature = "4.6.2")]
pub const NC_PERSIST: c_int = 0x4000;

pub const NC_INMEMORY: c_int = 0x8000;

#[cfg(feature = "4.9.0")]
pub const NC_NOATTCREORD: c_int = 0x20000;
#[cfg(feature = "4.9.0")]
pub const NC_NODIMSCALE_ATTACH: c_int = 0x40000;

#[cfg(feature = "4.6.2")]
pub const NC_MAX_MAGIC_NUMBER_LEN: usize = 8;

Expand Down
9 changes: 9 additions & 0 deletions netcdf/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ bitflags::bitflags! {
const NETCDF4 = NC_NETCDF4;
/// Read from memory
const INMEMORY = NC_INMEMORY;
/// Disable netcdf-4 (hdf5) attribute creation order tracking
#[cfg(feature = "4.9.0")]
const NOATTCREORD = NC_NOATTCREORD;
/// Disable netcdf-4 (hdf5) attaching dimscales to variables
#[cfg(feature = "4.9.0")]
const NODIMSCALE_ATTACH = NC_NODIMSCALE_ATTACH;

// Unknown flags from C library
const _ = !0;
}
}

Expand Down

0 comments on commit 7e4d2ec

Please sign in to comment.