Skip to content

Commit d848e7c

Browse files
committed
fix graalpy issue
1 parent ab43f5f commit d848e7c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

guide/src/class.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,16 +210,16 @@ It can either return `()` or `PyResult<()>`.
210210
```rust
211211
# #![allow(dead_code)]
212212
# use pyo3::prelude::*;
213-
# #[cfg(not(Py_LIMITED_API))]
213+
# #[cfg(not(any(Py_LIMITED_API, GraalPy)))]
214214
use pyo3::types::{PyDict, PyTuple, PySuper};
215-
# #[cfg(not(Py_LIMITED_API))]
215+
# #[cfg(not(any(Py_LIMITED_API, GraalPy)))]
216216
use crate::pyo3::PyTypeInfo;
217217

218-
# #[cfg(not(Py_LIMITED_API))]
218+
# #[cfg(not(any(Py_LIMITED_API, GraalPy)))]
219219
#[pyclass(extends = PyDict)]
220220
struct MyDict;
221221

222-
# #[cfg(not(Py_LIMITED_API))]
222+
# #[cfg(not(any(Py_LIMITED_API, GraalPy)))]
223223
#[pymethods]
224224
impl MyDict {
225225
# #[allow(unused_variables)]
@@ -249,7 +249,7 @@ impl MyDict {
249249
}
250250
}
251251

252-
# #[cfg(not(Py_LIMITED_API))]
252+
# #[cfg(not(any(Py_LIMITED_API, GraalPy)))]
253253
# fn main() {
254254
# Python::attach(|py| {
255255
# let typeobj = py.get_type::<MyDict>();
@@ -258,7 +258,7 @@ impl MyDict {
258258
# assert_eq!(obj.get_item("my_key").unwrap().extract::<&str>().unwrap(), "always insert this key");
259259
# });
260260
# }
261-
# #[cfg(Py_LIMITED_API)]
261+
# #[cfg(any(Py_LIMITED_API, GraalPy))]
262262
# fn main() {}
263263
```
264264

0 commit comments

Comments
 (0)