Commit ea9f1689 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-26219: Fix compiler warning in _PyCode_InitOpcache() (GH-13809)

Fix this MSVC warning:

    objects\codeobject.c(264): warning C4244: '=':
    conversion from 'Py_ssize_t' to 'unsigned char', possible loss of data
parent 8d561092
......@@ -261,7 +261,8 @@ _PyCode_InitOpcache(PyCodeObject *co)
// TODO: LOAD_METHOD, LOAD_ATTR
if (opcode == LOAD_GLOBAL) {
co->co_opcache_map[i] = ++opts;
opts++;
co->co_opcache_map[i] = (unsigned char)opts;
if (opts > 254) {
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment