Skip to content

Commit

Permalink
Don't inline on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Feb 27, 2024
1 parent 31c1e79 commit 0310038
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/arch/x86_64/memchr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ macro_rules! unsafe_ifunc {
/// # Safety
///
/// Pointers must be valid. See `One::find_raw`.
#[inline(always)]
#[cfg_attr(not(windows), inline(always))]
pub(crate) fn memchr_raw(
n1: u8,
start: *const u8,
Expand All @@ -193,7 +193,7 @@ pub(crate) fn memchr_raw(
/// # Safety
///
/// Pointers must be valid. See `One::rfind_raw`.
#[inline(always)]
#[cfg_attr(not(windows), inline(always))]
pub(crate) fn memrchr_raw(
n1: u8,
start: *const u8,
Expand All @@ -216,7 +216,7 @@ pub(crate) fn memrchr_raw(
/// # Safety
///
/// Pointers must be valid. See `Two::find_raw`.
#[inline(always)]
#[cfg_attr(not(windows), inline(always))]
pub(crate) fn memchr2_raw(
n1: u8,
n2: u8,
Expand All @@ -241,7 +241,7 @@ pub(crate) fn memchr2_raw(
/// # Safety
///
/// Pointers must be valid. See `Two::rfind_raw`.
#[inline(always)]
#[cfg_attr(not(windows), inline(always))]
pub(crate) fn memrchr2_raw(
n1: u8,
n2: u8,
Expand All @@ -266,7 +266,7 @@ pub(crate) fn memrchr2_raw(
/// # Safety
///
/// Pointers must be valid. See `Three::find_raw`.
#[inline(always)]
#[cfg_attr(not(windows), inline(always))]
pub(crate) fn memchr3_raw(
n1: u8,
n2: u8,
Expand All @@ -293,7 +293,7 @@ pub(crate) fn memchr3_raw(
/// # Safety
///
/// Pointers must be valid. See `Three::rfind_raw`.
#[inline(always)]
#[cfg_attr(not(windows), inline(always))]
pub(crate) fn memrchr3_raw(
n1: u8,
n2: u8,
Expand All @@ -320,7 +320,7 @@ pub(crate) fn memrchr3_raw(
/// # Safety
///
/// Pointers must be valid. See `One::count_raw`.
#[inline(always)]
#[cfg_attr(not(windows), inline(always))]
pub(crate) fn count_raw(n1: u8, start: *const u8, end: *const u8) -> usize {
// SAFETY: We provide a valid function pointer type.
unsafe_ifunc!(
Expand Down

0 comments on commit 0310038

Please sign in to comment.