diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-06-04 17:08:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-04 17:08:24 +0200 |
commit | ea9f168957f7236aae2185f65e0dc608a9a7a37b (patch) | |
tree | d5ccb48626d7a380238dc4eeb8349ba238f23f53 /Objects | |
parent | 8d561092d510670ce9c038701c90c913453eac90 (diff) | |
download | cpython-git-ea9f168957f7236aae2185f65e0dc608a9a7a37b.tar.gz |
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
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/codeobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 0d9e5d16e7..63ce479359 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -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; } |