Skip to content

Commit 332101a

Browse files
committed
Limit ctypes snapshot helper to supported targets
Assisted-by: Codex:GPT-6
1 parent 986e6a3 commit 332101a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎crates/vm/src/object/core.rs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2951,6 +2951,16 @@ impl<T: PyPayload + crate::object::MaybeTraverse + core::fmt::Debug> PyRef<T> {
29512951

29522952
/// Allocate and track internal storage without running collection during
29532953
/// publication. The next ordinary tracked allocation still checks thresholds.
2954+
#[cfg(all(
2955+
feature = "host_env",
2956+
any(
2957+
target_os = "linux",
2958+
target_os = "macos",
2959+
target_os = "windows",
2960+
target_os = "android"
2961+
),
2962+
not(any(target_env = "musl", target_env = "sgx"))
2963+
))]
29542964
pub(crate) fn new_ref_without_collection(
29552965
payload: T,
29562966
typ: crate::builtins::PyTypeRef,

0 commit comments

Comments
 (0)