From 862804de3b2dd75c227ff89eceb64b66129df832 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Thu, 16 May 2024 23:03:39 +0200 Subject: [PATCH] rename c-api to c_api --- servicepoint2-binding-cs/Cargo.toml | 2 +- servicepoint2/Cargo.toml | 2 +- servicepoint2/src/bit_vec.rs | 2 +- servicepoint2/src/byte_grid.rs | 2 +- servicepoint2/src/c_slice.rs | 2 +- servicepoint2/src/command.rs | 2 +- servicepoint2/src/connection.rs | 2 +- servicepoint2/src/lib.rs | 2 +- servicepoint2/src/packet.rs | 2 +- servicepoint2/src/pixel_grid.rs | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/servicepoint2-binding-cs/Cargo.toml b/servicepoint2-binding-cs/Cargo.toml index 90c5287..d86014b 100644 --- a/servicepoint2-binding-cs/Cargo.toml +++ b/servicepoint2-binding-cs/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -servicepoint2 = { path = "../servicepoint2", features = ["c-api"] } +servicepoint2 = { path = "../servicepoint2", features = ["c_api"] } [build-dependencies] csbindgen = "1.8.0" diff --git a/servicepoint2/Cargo.toml b/servicepoint2/Cargo.toml index 13258af..1c40ac3 100644 --- a/servicepoint2/Cargo.toml +++ b/servicepoint2/Cargo.toml @@ -26,4 +26,4 @@ compression_bzip2 = ["dep:bzip2", "compression"] compression_lzma = ["dep:rust-lzma", "compression"] compression_zstd = ["dep:zstd", "compression"] compression = [] -c-api = [] +c_api = [] diff --git a/servicepoint2/src/bit_vec.rs b/servicepoint2/src/bit_vec.rs index c148b89..ebb04ad 100644 --- a/servicepoint2/src/bit_vec.rs +++ b/servicepoint2/src/bit_vec.rs @@ -121,7 +121,7 @@ impl std::fmt::Debug for BitVec { } } -#[cfg(feature = "c-api")] +#[cfg(feature = "c_api")] pub mod c_api { use crate::{BitVec, CByteSlice}; diff --git a/servicepoint2/src/byte_grid.rs b/servicepoint2/src/byte_grid.rs index 2ce175a..4938b34 100644 --- a/servicepoint2/src/byte_grid.rs +++ b/servicepoint2/src/byte_grid.rs @@ -66,7 +66,7 @@ impl From for Vec { } } -#[cfg(feature = "c-api")] +#[cfg(feature = "c_api")] pub mod c_api { use crate::{ByteGrid, CByteSlice}; diff --git a/servicepoint2/src/c_slice.rs b/servicepoint2/src/c_slice.rs index f292285..5ee71f6 100644 --- a/servicepoint2/src/c_slice.rs +++ b/servicepoint2/src/c_slice.rs @@ -1,4 +1,4 @@ -#[cfg(feature = "c-api")] +#[cfg(feature = "c_api")] #[repr(C)] /// Represents a span of memory (`&mut [u8]` ) as a struct usable by C code. /// diff --git a/servicepoint2/src/command.rs b/servicepoint2/src/command.rs index 1a9e2d0..f6c6395 100644 --- a/servicepoint2/src/command.rs +++ b/servicepoint2/src/command.rs @@ -335,7 +335,7 @@ fn packet_into_linear_bitmap( Ok((BitVec::from(&*payload), sub)) } -#[cfg(feature = "c-api")] +#[cfg(feature = "c_api")] pub mod c_api { use std::ptr::null_mut; diff --git a/servicepoint2/src/connection.rs b/servicepoint2/src/connection.rs index ba57234..bd503cd 100644 --- a/servicepoint2/src/connection.rs +++ b/servicepoint2/src/connection.rs @@ -64,7 +64,7 @@ impl Connection { } } -#[cfg(feature = "c-api")] +#[cfg(feature = "c_api")] pub mod c_api { use std::ffi::{c_char, CStr}; diff --git a/servicepoint2/src/lib.rs b/servicepoint2/src/lib.rs index 05106c1..1fea335 100644 --- a/servicepoint2/src/lib.rs +++ b/servicepoint2/src/lib.rs @@ -6,7 +6,7 @@ pub use crate::connection::Connection; pub use crate::packet::{Header, Packet, Payload}; pub use crate::pixel_grid::PixelGrid; -#[cfg(feature = "c-api")] +#[cfg(feature = "c_api")] pub use crate::c_slice::CByteSlice; mod bit_vec; diff --git a/servicepoint2/src/packet.rs b/servicepoint2/src/packet.rs index e144bf9..03e2c89 100644 --- a/servicepoint2/src/packet.rs +++ b/servicepoint2/src/packet.rs @@ -58,7 +58,7 @@ impl TryFrom<&[u8]> for Packet { } } -#[cfg(feature = "c-api")] +#[cfg(feature = "c_api")] mod c_api { use std::ptr::null_mut; diff --git a/servicepoint2/src/pixel_grid.rs b/servicepoint2/src/pixel_grid.rs index 9cad805..edc4415 100644 --- a/servicepoint2/src/pixel_grid.rs +++ b/servicepoint2/src/pixel_grid.rs @@ -89,7 +89,7 @@ impl From for Vec { } } -#[cfg(feature = "c-api")] +#[cfg(feature = "c_api")] pub mod c_api { use crate::c_slice::CByteSlice;