mirror of https://github.com/python/cpython
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
This commit is contained in:
parent
8d561092d5
commit
ea9f168957
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue