Skip to content

Commit

Permalink
Expose LogLevel via FFI
Browse files Browse the repository at this point in the history
This makes cbindgen include the LogLevel enum in the generated headers
  • Loading branch information
za-creature committed Jan 14, 2025
1 parent 50044ab commit a0be495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ fn init(
#[no_mangle]
pub unsafe extern "C" fn log_init(
file: *const c_char,
callback: Option<extern "C" fn(u8, *const c_char)>,
callback: Option<extern "C" fn(LogLevel, *const c_char)>,
tag: *const c_char,
) -> ErrorCode {
try_log_init(file, callback, tag).to_error_code()
Expand All @@ -188,7 +188,7 @@ static LOGGER: OnceLock<Logger> = OnceLock::new();

unsafe fn try_log_init(
file: *const c_char,
callback: Option<extern "C" fn(u8, *const c_char)>,
callback: Option<extern "C" fn(LogLevel, *const c_char)>,
tag: *const c_char,
) -> Result<(), Error> {
let file = if file.is_null() {
Expand Down

0 comments on commit a0be495

Please sign in to comment.