Skip to content

Commit 685f6eb

Browse files
committed
use target family for windows
1 parent 7b6ffe1 commit 685f6eb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/builders/function.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ use crate::{
99
use std::{ffi::CString, mem, ptr};
1010

1111
/// Function representation in Rust.
12-
#[cfg(not(windows))]
12+
#[cfg(not(target_family = "windows"))]
1313
pub type FunctionHandler = extern "C" fn(execute_data: &mut ExecuteData, retval: &mut Zval);
14-
#[cfg(windows)]
14+
#[cfg(target_family = "windows")]
1515
pub type FunctionHandler =
1616
extern "vectorcall" fn(execute_data: &mut ExecuteData, retval: &mut Zval);
1717

1818
/// Function representation in Rust using pointers.
19-
#[cfg(not(windows))]
19+
#[cfg(not(target_family = "windows"))]
2020
type FunctionPointerHandler = extern "C" fn(execute_data: *mut ExecuteData, retval: *mut Zval);
21-
#[cfg(windows)]
21+
#[cfg(target_family = "windows")]
2222
type FunctionPointerHandler =
2323
extern "vectorcall" fn(execute_data: *mut ExecuteData, retval: *mut Zval);
2424

src/describe/stub.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ impl ToStub for Constant {
320320
}
321321
}
322322

323-
#[cfg(windows)]
323+
#[cfg(target_family = "windows")]
324324
const NEW_LINE_SEPARATOR: &str = "\r\n";
325-
#[cfg(not(windows))]
325+
#[cfg(not(target_family = "windows"))]
326326
const NEW_LINE_SEPARATOR: &str = "\n";
327327

328328
/// Takes a class name and splits the namespace off from the actual class name.

0 commit comments

Comments
 (0)