From dd04d2c4cc52e9368343b7ae06c467c29dd68e14 Mon Sep 17 00:00:00 2001 From: Tpt Date: Wed, 9 Aug 2023 16:19:17 +0200 Subject: [PATCH] Fixes linking of `PyOS_FSPath` on PyPy. --- newsfragments/3374.fixed.md | 1 + pyo3-ffi/src/osmodule.rs | 1 + 2 files changed, 2 insertions(+) create mode 100644 newsfragments/3374.fixed.md diff --git a/newsfragments/3374.fixed.md b/newsfragments/3374.fixed.md new file mode 100644 index 00000000..830ccb29 --- /dev/null +++ b/newsfragments/3374.fixed.md @@ -0,0 +1 @@ +Linking of `PyOS_FSPath` on PyPy. \ No newline at end of file diff --git a/pyo3-ffi/src/osmodule.rs b/pyo3-ffi/src/osmodule.rs index cacec443..e6aefc36 100644 --- a/pyo3-ffi/src/osmodule.rs +++ b/pyo3-ffi/src/osmodule.rs @@ -1,5 +1,6 @@ use crate::object::PyObject; extern "C" { + #[cfg_attr(PyPy, link_name = "PyPyOS_FSPath")] pub fn PyOS_FSPath(path: *mut PyObject) -> *mut PyObject; }