Skip to content

Commit eb46ca2

Browse files
Make PyUnicodeWriter an alias on <=3.13
1 parent bfb72fb commit eb46ca2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pyo3-ffi/src/cpython/unicodeobject.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,11 +686,16 @@ extern "C" {
686686
// skipped PyUnicode_GetMax
687687
}
688688

689+
#[cfg(Py_3_14)]
689690
opaque_struct!(pub PyUnicodeWriter);
690691

691692
#[cfg(not(Py_3_14))]
693+
pub type PyUnicodeWriter = _PyUnicodeWriter;
694+
695+
#[cfg(not(Py_3_14))]
696+
#[doc(hidden)]
692697
#[repr(C)]
693-
pub(crate) struct _PyUnicodeWriter {
698+
pub struct _PyUnicodeWriter {
694699
buffer: *mut PyObject,
695700
data: *mut c_void,
696701
kind: c_int,

0 commit comments

Comments
 (0)