mirror of
https://github.com/loot/loot-condition-interpreter.git
synced 2026-07-27 14:16:09 -07:00
Swap out some libc type aliases with std::ffi equivalents
Unfortunately std::ffi::c_size_t is currently experimental, and if I define c_size_t = usize myself then cbindgen doesn't recognise it properly and makes c_size_t a typedef of uintptr_t instead of just replacing it with size_t.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use libc::c_int;
|
||||
use std::ffi::c_int;
|
||||
|
||||
#[no_mangle]
|
||||
pub static LCI_OK: c_int = 0;
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
use std::ffi::{CStr, CString};
|
||||
use std::ffi::{c_char, c_int, CStr, CString};
|
||||
use std::path::PathBuf;
|
||||
use std::slice;
|
||||
|
||||
use libc::{c_char, c_int, size_t};
|
||||
use libc::size_t;
|
||||
use loot_condition_interpreter::{Error, GameType};
|
||||
|
||||
use super::ERROR_MESSAGE;
|
||||
|
||||
+1
-2
@@ -6,12 +6,11 @@ mod helpers;
|
||||
mod state;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::ffi::CString;
|
||||
use std::ffi::{c_char, c_int, CString};
|
||||
use std::panic::catch_unwind;
|
||||
use std::ptr;
|
||||
use std::str::FromStr;
|
||||
|
||||
use libc::{c_char, c_int};
|
||||
use loot_condition_interpreter::*;
|
||||
|
||||
pub use constants::*;
|
||||
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
use std::ffi::{c_char, c_int};
|
||||
use std::panic::catch_unwind;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::RwLock;
|
||||
|
||||
use libc::{c_char, c_int, size_t};
|
||||
use libc::size_t;
|
||||
use loot_condition_interpreter::State;
|
||||
|
||||
use crate::constants::*;
|
||||
|
||||
Reference in New Issue
Block a user