Skip to content

Commit

Permalink
Remove duplicated attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
mulimoen committed Jun 17, 2024
1 parent a5669e4 commit a1b372e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions netcdf-sys/src/mmap.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
#![cfg(feature = "has-mmap")]

use std::os::raw::{c_char, c_int, c_void};

#[repr(C)]
#[derive(Copy, Clone)]
#[cfg(all(feature = "has-mmap", feature = "1.6.2"))]
#[cfg(feature = "1.6.2")]
pub struct NC_memio {
size: usize,
memory: *mut c_void,
flags: c_int,
}

extern "C" {
#[cfg(feature = "has-mmap")]
pub fn nc_open_mem(
path: *const c_char,
mode: c_int,
Expand All @@ -21,21 +18,21 @@ extern "C" {
ncidp: *mut c_int,
) -> c_int;

#[cfg(all(feature = "has-mmap", feature = "1.6.2"))]
#[cfg(feature = "1.6.2")]
pub fn nc_create_mem(
path: *const c_char,
mode: c_int,
initialsize: usize,
ncidp: *mut c_int,
) -> c_int;
#[cfg(all(feature = "has-mmap", feature = "1.6.2"))]
#[cfg(feature = "1.6.2")]
pub fn nc_open_memio(
path: *const c_char,
mode: c_int,
info: *mut NC_memio,
ncidp: *mut c_int,
) -> c_int;

#[cfg(all(feature = "has-mmap", feature = "1.6.2"))]
#[cfg(feature = "1.6.2")]
pub fn nc_close_memio(ncid: c_int, info: *mut NC_memio) -> c_int;
}

0 comments on commit a1b372e

Please sign in to comment.