c++: proper include for intptr_t/uinptr_t
mod swig_foreign_types_map {
- #![swig_foreigner_type = "uintptr_t"]
- #![swig_rust_type = "usize"]
#![swig_foreigner_type = "float"]
#![swig_rust_type = "f32"]
#![swig_foreigner_type = "double"]
@@ -56,6 +54,16 @@ foreign_typemap!(
(f_type, req_modules = ["<stdint.h>"]) "uint64_t";
);
+foreign_typemap!(
+ (r_type) usize;
+ (f_type, req_modules = ["<stdint.h>"]) "uintptr_t";
+);
+
+foreign_typemap!(
+ (r_type) isize;
+ (f_type, req_modules = ["<stdint.h>"]) "intptr_t";
+);
+
#[allow(unused_macros)]
macro_rules! swig_c_str {
($lit:expr) => {
