Skip to content

Commit 6314abc

Browse files
authored
bpo-37802: Fix a compiler warning in longobject.c (GH-16517)
bpo-37802, bpo-38321: Fix the following warnings: longobject.c(420): warning C4244: 'function': conversion from 'unsigned __int64' to 'sdigit', possible loss of data longobject.c(428): warning C4267: 'function': conversion from 'size_t' to 'sdigit', possible loss of data
1 parent 5e0ea75 commit 6314abc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/longobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ PyLong_FromLong(long ival)
383383
#define PYLONG_FROM_UINT(INT_TYPE, ival) \
384384
do { \
385385
if (IS_SMALL_UINT(ival)) { \
386-
return get_small_int((ival)); \
386+
return get_small_int((sdigit)(ival)); \
387387
} \
388388
/* Count the number of Python digits. */ \
389389
Py_ssize_t ndigits = 0; \

0 commit comments

Comments
 (0)