Skip to content

Commit bc6a302

Browse files
committed
add comments about location of opaque pointers in CPython headers
1 parent 2def578 commit bc6a302

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pyo3-ffi/src/object.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use std::ptr;
1111
#[cfg(Py_GIL_DISABLED)]
1212
use std::sync::atomic::{AtomicIsize, AtomicU32};
1313

14+
// from pytypedefs.h
1415
#[cfg(Py_LIMITED_API)]
1516
opaque_struct!(pub PyTypeObject);
1617

@@ -162,6 +163,7 @@ pub const PyObject_HEAD_INIT: PyObject = PyObject {
162163
ob_type: std::ptr::null_mut(),
163164
};
164165

166+
// from pytypedefs.h
165167
#[cfg(_Py_OPAQUE_PYOBJECT)]
166168
opaque_struct!(pub PyObject);
167169

@@ -181,6 +183,7 @@ pub struct PyVarObject {
181183
pub _ob_size_graalpy: Py_ssize_t,
182184
}
183185

186+
// from pytypedefs.h
184187
#[cfg(_Py_OPAQUE_PYOBJECT)]
185188
opaque_struct!(pub PyVarObject);
186189

0 commit comments

Comments
 (0)