Skip to content

Commit f31617b

Browse files
committed
pyo3-ffi: remove _PyUnicode_COMPACT_DATA from tests
1 parent df36c71 commit f31617b

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

newsfragments/10489.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed use of the CPython-internal `_PyUnicode_COMPACT_DATA` symbol from PyO3's FFI test suite.

src/ffi/tests.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,6 @@ fn ascii() {
200200
// 2 and 4 byte macros return nonsense for this string instance.
201201
assert_eq!(PyUnicode_KIND(ptr), PyUnicode_1BYTE_KIND);
202202

203-
#[cfg(not(Py_3_14))]
204-
assert!(!_PyUnicode_COMPACT_DATA(ptr).is_null());
205203
// _PyUnicode_NONCOMPACT_DATA isn't valid for compact strings.
206204
assert!(!PyUnicode_DATA(ptr).is_null());
207205

@@ -243,8 +241,6 @@ fn ucs4() {
243241
assert!(!PyUnicode_4BYTE_DATA(ptr).is_null());
244242
assert_eq!(PyUnicode_KIND(ptr), PyUnicode_4BYTE_KIND);
245243

246-
#[cfg(not(Py_3_14))]
247-
assert!(!_PyUnicode_COMPACT_DATA(ptr).is_null());
248244
// _PyUnicode_NONCOMPACT_DATA isn't valid for compact strings.
249245
assert!(!PyUnicode_DATA(ptr).is_null());
250246

0 commit comments

Comments
 (0)