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

Fix MSVC warning:

    objects\codeobject.c(285): warning C4244: '=':
    conversion from 'Py_ssize_t' to 'unsigned char',
    possible loss of data
(cherry picked from commit 376ce9852e)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
This commit is contained in:
Miss Islington (bot) 2019-06-12 03:14:43 -07:00 committed by Victor Stinner
parent 878227e721
commit 996e52623a
1 changed files with 1 additions and 1 deletions

View File

@ -282,7 +282,7 @@ _PyCode_InitOpcache(PyCodeObject *co)
co->co_opcache = NULL;
}
co->co_opcache_size = opts;
co->co_opcache_size = (unsigned char)opts;
return 0;
}