Skip to content

Commit 376ce98

Browse files
authored
bpo-26219: Fix compiler warning in _PyCode_InitOpcache() (GH-13997)
Fix MSVC warning: objects\codeobject.c(285): warning C4244: '=': conversion from 'Py_ssize_t' to 'unsigned char', possible loss of data
1 parent eb976e4 commit 376ce98

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)