File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -723,6 +723,12 @@ Porting to Python 3.11
723723 been included directly, consider including ``Python.h `` instead.
724724 (Contributed by Victor Stinner in :issue: `35134 `.)
725725
726+ * The :c:func: `PyUnicode_CHECK_INTERNED ` macro has been excluded from the
727+ limited C API. It was never usable there, because it used internal structures
728+ which are not available in the limited C API.
729+ (Contributed by Victor Stinner in :issue: `46007 `.)
730+
731+
726732Deprecated
727733----------
728734
Original file line number Diff line number Diff line change @@ -279,6 +279,10 @@ PyAPI_FUNC(int) _PyUnicode_CheckConsistency(
279279#define SSTATE_INTERNED_MORTAL 1
280280#define SSTATE_INTERNED_IMMORTAL 2
281281
282+ /* Use only if you know it's a string */
283+ #define PyUnicode_CHECK_INTERNED (op ) \
284+ (((PyASCIIObject *)(op))->state.interned)
285+
282286/* Return true if the string contains only ASCII characters, or 0 if not. The
283287 string may be compact (PyUnicode_IS_COMPACT_ASCII) or not, but must be
284288 ready. */
Original file line number Diff line number Diff line change @@ -269,10 +269,6 @@ PyAPI_FUNC(PyObject *) PyUnicode_InternFromString(
269269// and will be removed in Python 3.12. Use PyUnicode_InternInPlace() instead.
270270Py_DEPRECATED (3.10 ) PyAPI_FUNC (void ) PyUnicode_InternImmortal (PyObject * * );
271271
272- /* Use only if you know it's a string */
273- #define PyUnicode_CHECK_INTERNED (op ) \
274- (((PyASCIIObject *)(op))->state.interned)
275-
276272/* --- wchar_t support for platforms which support it --------------------- */
277273
278274#ifdef HAVE_WCHAR_H
Original file line number Diff line number Diff line change 1+ The :c:func: `PyUnicode_CHECK_INTERNED ` macro has been excluded from the limited
2+ C API. It was never usable there, because it used internal structures which are
3+ not available in the limited C API. Patch by Victor Stinner.
You can’t perform that action at this time.
0 commit comments