Skip to content

Commit fb7a4c9

Browse files
Merge pull request informationsea#39 from eksea/master
fix build error on macOS
2 parents 1633f63 + 9bd412d commit fb7a4c9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libxlsxwriter/src/worksheet/filter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl FilterRule {
105105
) -> Result<libxlsxwriter_sys::lxw_filter_rule, XlsxError> {
106106
Ok(libxlsxwriter_sys::lxw_filter_rule {
107107
criteria: self.criteria.into_internal() as u8,
108-
value_string: c_string_helper.add_opt(self.value.to_str())? as *mut std::ffi::c_char,
108+
value_string: c_string_helper.add_opt(self.value.to_str())? as *mut std::os::raw::c_char,
109109
value: self.value.to_f64().unwrap_or_default(),
110110
})
111111
}
@@ -268,7 +268,7 @@ impl<'a> Worksheet<'a> {
268268
let mut cstring_helper = crate::CStringHelper::new();
269269
let mut cstr_list: Vec<_> = try_to_vec(
270270
list.iter()
271-
.map(|x| Ok(cstring_helper.add(x)? as *mut std::ffi::c_char)),
271+
.map(|x| Ok(cstring_helper.add(x)? as *mut std::os::raw::c_char)),
272272
)?;
273273
cstr_list.push(std::ptr::null_mut());
274274
unsafe {

libxlsxwriter/src/worksheet/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,14 @@ impl CommentOptions {
335335
) -> Result<libxlsxwriter_sys::lxw_comment_options, XlsxError> {
336336
Ok(libxlsxwriter_sys::lxw_comment_options {
337337
visible: self.visible.into_internal() as u8,
338-
author: workbook.register_option_str(self.author.as_deref())? as *mut std::ffi::c_char,
338+
author: workbook.register_option_str(self.author.as_deref())? as *mut c_char,
339339
width: self.width.unwrap_or_default(),
340340
height: self.height.unwrap_or_default(),
341341
x_scale: self.x_scale.unwrap_or_default(),
342342
y_scale: self.y_scale.unwrap_or_default(),
343343
color: self.color.value(),
344344
font_name: workbook.register_option_str(self.font_name.as_deref())?
345-
as *mut std::ffi::c_char,
345+
as *mut c_char,
346346
font_size: self.font_size.unwrap_or_default(),
347347
font_family: self.font_family.unwrap_or_default(),
348348
start_row: self.start_row,

0 commit comments

Comments
 (0)