fix arm build default tip
authornemo
Mon, 10 Feb 2025 09:52:32 -0500
changeset 16088 cb472e3d0dd4
parent 16086 ee8b894272d0
fix arm build
rust/lib-hwengine-future/src/lib.rs
--- a/rust/lib-hwengine-future/src/lib.rs	Tue Feb 04 15:53:16 2025 +0100
+++ b/rust/lib-hwengine-future/src/lib.rs	Mon Feb 10 09:52:32 2025 -0500
@@ -1,6 +1,7 @@
 mod ai;
 
 use integral_geometry::{Point, Size};
+use core::ffi::c_char;
 
 use ai::*;
 use landgen::{
@@ -50,9 +51,9 @@
 #[no_mangle]
 pub unsafe extern "C" fn generate_outline_templated_game_field(
     feature_size: u32,
-    seed: *const i8,
-    template_type: *const i8,
-    data_path: *const i8,
+    seed: *const c_char,
+    template_type: *const c_char,
+    data_path: *const c_char,
 ) -> *mut GameField {
     let data_path: &str = CStr::from_ptr(data_path).to_str().unwrap();
     let data_path = Path::new(&data_path);
@@ -90,9 +91,9 @@
 #[no_mangle]
 pub unsafe extern "C" fn generate_wfc_templated_game_field(
     feature_size: u32,
-    seed: *const i8,
-    template_type: *const i8,
-    data_path: *const i8,
+    seed: *const c_char,
+    template_type: *const c_char,
+    data_path: *const c_char,
 ) -> *mut GameField {
     let data_path: &str = CStr::from_ptr(data_path).to_str().unwrap();
     let data_path = Path::new(&data_path);
@@ -135,9 +136,9 @@
 #[no_mangle]
 pub unsafe extern "C" fn generate_maze_game_field(
     feature_size: u32,
-    seed: *const i8,
-    template_type: *const i8,
-    data_path: *const i8,
+    seed: *const c_char,
+    template_type: *const c_char,
+    data_path: *const c_char,
 ) -> *mut GameField {
     let data_path: &str = CStr::from_ptr(data_path).to_str().unwrap();
     let data_path = Path::new(&data_path);
@@ -178,8 +179,8 @@
 #[no_mangle]
 pub unsafe extern "C" fn apply_theme(
     game_field: &mut GameField,
-    data_path: *const i8,
-    theme_name: *const i8,
+    data_path: *const c_char,
+    theme_name: *const c_char,
 ) {
     let data_path: &str = CStr::from_ptr(data_path).to_str().unwrap();
     let data_path = Path::new(&data_path);