Staging
v0.8.1
https://github.com/python/cpython
Revision 73e02ff0d47c37cf2a8f137cfbea0b36d26c48bb authored by Miss Islington (bot) on 18 November 2020, 12:29:34 UTC, committed by GitHub on 18 November 2020, 12:29:34 UTC

skip test_min_max_version_mismatch when TLS 1.0 is not available

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit ce04e7105bc396c32667a22b928a712ba0778a3f)

Co-authored-by: Christian Heimes <christian@python.org>
1 parent a702bd4
Raw File
Tip revision: 73e02ff0d47c37cf2a8f137cfbea0b36d26c48bb authored by Miss Islington (bot) on 18 November 2020, 12:29:34 UTC
bpo-41561: skip test_min_max_version_mismatch (GH-22308)
Tip revision: 73e02ff
pystrcmp.c
/* Cross platform case insensitive string compare functions
 */

#include "Python.h"

int
PyOS_mystrnicmp(const char *s1, const char *s2, Py_ssize_t size)
{
    const unsigned char *p1, *p2;
    if (size == 0)
        return 0;
    p1 = (const unsigned char *)s1;
    p2 = (const unsigned char *)s2;
    for (; (--size > 0) && *p1 && *p2 && (tolower(*p1) == tolower(*p2));
         p1++, p2++) {
        ;
    }
    return tolower(*p1) - tolower(*p2);
}

int
PyOS_mystricmp(const char *s1, const char *s2)
{
    const unsigned char *p1 = (const unsigned char *)s1;
    const unsigned char *p2 = (const unsigned char *)s2;
    for (; *p1 && *p2 && (tolower(*p1) == tolower(*p2)); p1++, p2++) {
        ;
    }
    return (tolower(*p1) - tolower(*p2));
}
back to top