mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-18 10:00:14 +01:00
rename c-api to c_api
This commit is contained in:
parent
da4df32878
commit
862804de3b
|
@ -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"
|
||||||
|
|
|
@ -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 = []
|
||||||
|
|
|
@ -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};
|
||||||
|
|
||||||
|
|
|
@ -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};
|
||||||
|
|
|
@ -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.
|
||||||
///
|
///
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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};
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue