Skip to content

Commit 868c089

Browse files
Commit
1 parent b3b63e8 commit 868c089

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

Doc/c-api/sys.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,28 @@ Operating System Utilities
267267
.. versionadded:: 3.14
268268
269269
270+
.. c:function:: int PyOS_mystricmp(const char *str1, const char *str2)
271+
272+
Compare two strings, *str1* and *str2*. The function works almost
273+
identically to :c:func:`!strcmp` except that it ignores the case.
274+
275+
Return ``0`` if the strings are equal, a negative value if *str1* is less
276+
than *str2*, or a positive value if *str1* is greater than *str2*.
277+
278+
This function is async-signal-safe and cannot fail.
279+
280+
281+
.. c:function:: int PyOS_mystrnicmp(const char *str1, const char *str2, Py_ssize_t size)
282+
283+
Compare two strings, *str1* and *str2*. The function works almost
284+
identically to :c:func:`!strncmp` except that it ignores the case.
285+
286+
Return ``0`` if the strings are equal, a negative value if *str1* is less
287+
than *str2*, or a positive value if *str1* is greater than *str2*.
288+
289+
This function is async-signal-safe and cannot fail.
290+
291+
270292
.. _systemfunctions:
271293
272294
System Functions

Misc/NEWS.d/3.10.0a1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3275,8 +3275,8 @@ Types created with :c:func:`PyType_FromSpec` now make any signature in their
32753275
.. nonce: u6Xfr2
32763276
.. section: C API
32773277
3278-
Fix bug in PyOS_mystrnicmp and PyOS_mystricmp that incremented pointers
3279-
beyond the end of a string.
3278+
Fix bug in :c:func:`PyOS_mystrnicmp` and :c:func:`PyOS_mystricmp` that
3279+
incremented pointers beyond the end of a string.
32803280

32813281
..
32823282

0 commit comments

Comments
 (0)