Skip to content

Commit 1055385

Browse files
vstinnerDinoV
authored andcommitted
bpo-26219: Fix compiler warning in _PyCode_InitOpcache() (pythonGH-13997)
Fix MSVC warning: objects\codeobject.c(285): warning C4244: '=': conversion from 'Py_ssize_t' to 'unsigned char', possible loss of data
1 parent 7cac690 commit 1055385

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Objects/codeobject.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ _PyCode_InitOpcache(PyCodeObject *co)
301301
co->co_opcache = NULL;
302302
}
303303

304-
co->co_opcache_size = opts;
304+
co->co_opcache_size = (unsigned char)opts;
305305
return 0;
306306
}
307307

0 commit comments

Comments
 (0)