mirror of
https://github.com/python/cpython.git
synced 2025-07-07 11:25:30 +00:00
gh-135379: fix MSVC warning: conversion from 'stwodigits' to 'digit' (GH-135714)
fix warning C4244: 'initializing': conversion from 'stwodigits' to 'digit', possible loss of data
This commit is contained in:
parent
2dbada179f
commit
82726600be
1 changed files with 1 additions and 1 deletions
|
@ -337,7 +337,7 @@ medium_from_stwodigits(stwodigits x)
|
|||
}
|
||||
_PyObject_Init((PyObject*)v, &PyLong_Type);
|
||||
}
|
||||
digit abs_x = x < 0 ? -x : x;
|
||||
digit abs_x = x < 0 ? (digit)(-x) : (digit)x;
|
||||
_PyLong_SetSignAndDigitCount(v, x<0?-1:1, 1);
|
||||
v->long_value.ob_digit[0] = abs_x;
|
||||
return PyStackRef_FromPyObjectStealMortal((PyObject *)v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue