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
wordcode_helpers.h
/* This file contains code shared by the compiler and the peephole
   optimizer.
 */

#ifdef WORDS_BIGENDIAN
#  define PACKOPARG(opcode, oparg) ((_Py_CODEUNIT)(((opcode) << 8) | (oparg)))
#else
#  define PACKOPARG(opcode, oparg) ((_Py_CODEUNIT)(((oparg) << 8) | (opcode)))
#endif

/* Minimum number of code units necessary to encode instruction with
   EXTENDED_ARGs */
static int
instrsize(unsigned int oparg)
{
    return oparg <= 0xff ? 1 :
        oparg <= 0xffff ? 2 :
        oparg <= 0xffffff ? 3 :
        4;
}

/* Spits out op/oparg pair using ilen bytes. codestr should be pointed at the
   desired location of the first EXTENDED_ARG */
static void
write_op_arg(_Py_CODEUNIT *codestr, unsigned char opcode,
    unsigned int oparg, int ilen)
{
    switch (ilen) {
        case 4:
            *codestr++ = PACKOPARG(EXTENDED_ARG, (oparg >> 24) & 0xff);
            /* fall through */
        case 3:
            *codestr++ = PACKOPARG(EXTENDED_ARG, (oparg >> 16) & 0xff);
            /* fall through */
        case 2:
            *codestr++ = PACKOPARG(EXTENDED_ARG, (oparg >> 8) & 0xff);
            /* fall through */
        case 1:
            *codestr++ = PACKOPARG(opcode, oparg & 0xff);
            break;
        default:
            Py_UNREACHABLE();
    }
}
back to top