@@ -25,10 +25,10 @@ compat_function!(
25
25
}
26
26
) ;
27
27
28
+ #[ cfg( not( Py_LIMITED_API ) ) ]
28
29
compat_function ! (
29
30
originally_defined_for( all( Py_3_14 , not( Py_LIMITED_API ) ) ) ;
30
31
31
- #[ cfg( not( Py_LIMITED_API ) ) ]
32
32
pub unsafe fn PyUnicodeWriter_Create ( length: crate :: Py_ssize_t ) -> * mut crate :: PyUnicodeWriter {
33
33
if length < 0 {
34
34
crate :: PyErr_SetString (
@@ -50,31 +50,31 @@ compat_function!(
50
50
}
51
51
) ;
52
52
53
+ #[ cfg( not( Py_LIMITED_API ) ) ]
53
54
compat_function ! (
54
55
originally_defined_for( all( Py_3_14 , not( Py_LIMITED_API ) ) ) ;
55
56
56
- #[ cfg( not( Py_LIMITED_API ) ) ]
57
57
pub unsafe fn PyUnicodeWriter_Finish ( writer: * mut crate :: PyUnicodeWriter ) -> * mut crate :: PyObject {
58
58
let str = crate :: _PyUnicodeWriter_Finish( writer. cast( ) ) ;
59
59
crate :: PyMem_Free ( writer. cast( ) ) ;
60
60
str
61
61
}
62
62
) ;
63
63
64
+ #[ cfg( not( Py_LIMITED_API ) ) ]
64
65
compat_function ! (
65
66
originally_defined_for( all( Py_3_14 , not( Py_LIMITED_API ) ) ) ;
66
67
67
- #[ cfg( not( Py_LIMITED_API ) ) ]
68
68
pub unsafe fn PyUnicodeWriter_Discard ( writer: * mut crate :: PyUnicodeWriter ) -> ( ) {
69
69
crate :: _PyUnicodeWriter_Dealloc( writer. cast( ) ) ;
70
70
crate :: PyMem_Free ( writer. cast( ) )
71
71
}
72
72
) ;
73
73
74
+ #[ cfg( not( Py_LIMITED_API ) ) ]
74
75
compat_function ! (
75
76
originally_defined_for( all( Py_3_14 , not( Py_LIMITED_API ) ) ) ;
76
77
77
- #[ cfg( not( Py_LIMITED_API ) ) ]
78
78
pub unsafe fn PyUnicodeWriter_WriteChar ( writer: * mut crate :: PyUnicodeWriter , ch: crate :: Py_UCS4 ) -> std:: os:: raw:: c_int {
79
79
if ch > 0x10ffff {
80
80
crate :: PyErr_SetString (
@@ -88,10 +88,10 @@ compat_function!(
88
88
}
89
89
) ;
90
90
91
+ #[ cfg( not( Py_LIMITED_API ) ) ]
91
92
compat_function ! (
92
93
originally_defined_for( all( Py_3_14 , not( Py_LIMITED_API ) ) ) ;
93
94
94
- #[ cfg( not( Py_LIMITED_API ) ) ]
95
95
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 {
96
96
let size = if size < 0 {
97
97
libc:: strlen( str ) as isize
0 commit comments