Skip to content

Commit 996e526

Browse files
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 376ce98) Co-authored-by: Victor Stinner <[email protected]>
1 parent 878227e commit 996e526

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/codeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ _PyCode_InitOpcache(PyCodeObject *co)
282282
co->co_opcache = NULL;
283283
}
284284

285-
co->co_opcache_size = opts;
285+
co->co_opcache_size = (unsigned char)opts;
286286
return 0;
287287
}
288288

0 commit comments

Comments
 (0)