rename c-api to c_api

This commit is contained in:
Vinzenz Schroeter 2024-05-16 23:03:39 +02:00
parent da4df32878
commit 862804de3b
10 changed files with 10 additions and 10 deletions

View file

@ -7,7 +7,7 @@ edition = "2021"
crate-type = ["cdylib"] crate-type = ["cdylib"]
[dependencies] [dependencies]
servicepoint2 = { path = "../servicepoint2", features = ["c-api"] } servicepoint2 = { path = "../servicepoint2", features = ["c_api"] }
[build-dependencies] [build-dependencies]
csbindgen = "1.8.0" csbindgen = "1.8.0"

View file

@ -26,4 +26,4 @@ compression_bzip2 = ["dep:bzip2", "compression"]
compression_lzma = ["dep:rust-lzma", "compression"] compression_lzma = ["dep:rust-lzma", "compression"]
compression_zstd = ["dep:zstd", "compression"] compression_zstd = ["dep:zstd", "compression"]
compression = [] compression = []
c-api = [] c_api = []

View file

@ -121,7 +121,7 @@ impl std::fmt::Debug for BitVec {
} }
} }
#[cfg(feature = "c-api")] #[cfg(feature = "c_api")]
pub mod c_api { pub mod c_api {
use crate::{BitVec, CByteSlice}; use crate::{BitVec, CByteSlice};

View file

@ -66,7 +66,7 @@ impl From<ByteGrid> for Vec<u8> {
} }
} }
#[cfg(feature = "c-api")] #[cfg(feature = "c_api")]
pub mod c_api pub mod c_api
{ {
use crate::{ByteGrid, CByteSlice}; use crate::{ByteGrid, CByteSlice};

View file

@ -1,4 +1,4 @@
#[cfg(feature = "c-api")] #[cfg(feature = "c_api")]
#[repr(C)] #[repr(C)]
/// Represents a span of memory (`&mut [u8]` ) as a struct usable by C code. /// Represents a span of memory (`&mut [u8]` ) as a struct usable by C code.
/// ///

View file

@ -335,7 +335,7 @@ fn packet_into_linear_bitmap(
Ok((BitVec::from(&*payload), sub)) Ok((BitVec::from(&*payload), sub))
} }
#[cfg(feature = "c-api")] #[cfg(feature = "c_api")]
pub mod c_api pub mod c_api
{ {
use std::ptr::null_mut; use std::ptr::null_mut;

View file

@ -64,7 +64,7 @@ impl Connection {
} }
} }
#[cfg(feature = "c-api")] #[cfg(feature = "c_api")]
pub mod c_api pub mod c_api
{ {
use std::ffi::{c_char, CStr}; use std::ffi::{c_char, CStr};

View file

@ -6,7 +6,7 @@ pub use crate::connection::Connection;
pub use crate::packet::{Header, Packet, Payload}; pub use crate::packet::{Header, Packet, Payload};
pub use crate::pixel_grid::PixelGrid; pub use crate::pixel_grid::PixelGrid;
#[cfg(feature = "c-api")] #[cfg(feature = "c_api")]
pub use crate::c_slice::CByteSlice; pub use crate::c_slice::CByteSlice;
mod bit_vec; mod bit_vec;

View file

@ -58,7 +58,7 @@ impl TryFrom<&[u8]> for Packet {
} }
} }
#[cfg(feature = "c-api")] #[cfg(feature = "c_api")]
mod c_api { mod c_api {
use std::ptr::null_mut; use std::ptr::null_mut;

View file

@ -89,7 +89,7 @@ impl From<PixelGrid> for Vec<u8> {
} }
} }
#[cfg(feature = "c-api")] #[cfg(feature = "c_api")]
pub mod c_api pub mod c_api
{ {
use crate::c_slice::CByteSlice; use crate::c_slice::CByteSlice;