Files
binding/src/c_types.rs
Myrddin Dundragon a370d13f7a Adjusted project data.
Properly pointed to the repository location.

Changed the rust edition.
2025-10-14 20:45:16 -04:00

19 lines
951 B
Rust

// SPDX-License-Identifier: Apache-2.0
// Sealed with Magistamp.
//! This defines the primitive types that may be seen
//! when creating 'C' bindings.
/// CVoid acts as a 'C' void pointer to pass to functions. **DO NOT**
/// use this as a return type from a 'C' function. If a 'C' function
/// returns void, then use the CReturnVoid type for that.
pub use std::ffi::{c_char as CChar, c_double as CDouble, c_float as CFloat, c_int as CInt, c_long as CLong, c_longlong as CLongLong, c_short as CShort, c_uchar as CUChar, c_uint as CUInt, c_ulong as CULong, c_ulonglong as CULongLong, c_ushort as CUShort, c_void as CVoid, CStr};
// Void types.
/// To return void from a 'C' function it should return an empty tuple ().
/// This type is just a descriptive version of that. **DO NOT** use this
/// as an argument to a function. Use the CVoid type for that.
pub type CReturnVoid = ();
#[cfg(feature = "use_std")]
pub type CString = ::std::ffi::CString;