Skip to content

Commit 9e7533f

Browse files
disable combat functions on abi3
1 parent a998094 commit 9e7533f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pyo3-ffi/src/compat/py_3_14.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ compat_function!(
2525
}
2626
);
2727

28+
#[cfg(not(Py_LIMITED_API))]
2829
compat_function!(
2930
originally_defined_for(all(Py_3_14, not(Py_LIMITED_API)));
3031

31-
#[cfg(not(Py_LIMITED_API))]
3232
pub unsafe fn PyUnicodeWriter_Create(length: crate::Py_ssize_t) -> *mut crate::PyUnicodeWriter {
3333
if length < 0 {
3434
crate::PyErr_SetString(
@@ -50,31 +50,31 @@ compat_function!(
5050
}
5151
);
5252

53+
#[cfg(not(Py_LIMITED_API))]
5354
compat_function!(
5455
originally_defined_for(all(Py_3_14, not(Py_LIMITED_API)));
5556

56-
#[cfg(not(Py_LIMITED_API))]
5757
pub unsafe fn PyUnicodeWriter_Finish(writer: *mut crate::PyUnicodeWriter) -> *mut crate::PyObject {
5858
let str = crate::_PyUnicodeWriter_Finish(writer.cast());
5959
crate::PyMem_Free(writer.cast());
6060
str
6161
}
6262
);
6363

64+
#[cfg(not(Py_LIMITED_API))]
6465
compat_function!(
6566
originally_defined_for(all(Py_3_14, not(Py_LIMITED_API)));
6667

67-
#[cfg(not(Py_LIMITED_API))]
6868
pub unsafe fn PyUnicodeWriter_Discard(writer: *mut crate::PyUnicodeWriter) -> () {
6969
crate::_PyUnicodeWriter_Dealloc(writer.cast());
7070
crate::PyMem_Free(writer.cast())
7171
}
7272
);
7373

74+
#[cfg(not(Py_LIMITED_API))]
7475
compat_function!(
7576
originally_defined_for(all(Py_3_14, not(Py_LIMITED_API)));
7677

77-
#[cfg(not(Py_LIMITED_API))]
7878
pub unsafe fn PyUnicodeWriter_WriteChar(writer: *mut crate::PyUnicodeWriter, ch: crate::Py_UCS4) -> std::os::raw::c_int {
7979
if ch > 0x10ffff {
8080
crate::PyErr_SetString(
@@ -88,10 +88,10 @@ compat_function!(
8888
}
8989
);
9090

91+
#[cfg(not(Py_LIMITED_API))]
9192
compat_function!(
9293
originally_defined_for(all(Py_3_14, not(Py_LIMITED_API)));
9394

94-
#[cfg(not(Py_LIMITED_API))]
9595
pub unsafe fn PyUnicodeWriter_WriteUTF8(writer: *mut crate::PyUnicodeWriter,str: *const std::os::raw::c_char, size: crate::Py_ssize_t) -> std::os::raw::c_int {
9696
let size = if size < 0 {
9797
libc::strlen(str) as isize

0 commit comments

Comments
 (0)