mirror of
https://github.com/python/cpython.git
synced 2025-08-25 11:15:02 +00:00
Removed redundant casts to char *
.
Corresponding functions now accept `const char *` (issue #1772673).
This commit is contained in:
parent
131caba074
commit
20b39b27d9
10 changed files with 17 additions and 18 deletions
|
@ -2026,7 +2026,7 @@ _PyFloat_Pack4(double x, unsigned char *p, int le)
|
|||
}
|
||||
else {
|
||||
float y = (float)x;
|
||||
const char *s = (char*)&y;
|
||||
const unsigned char *s = (unsigned char*)&y;
|
||||
int i, incr = 1;
|
||||
|
||||
if (Py_IS_INFINITY(y) && !Py_IS_INFINITY(x))
|
||||
|
@ -2162,7 +2162,7 @@ _PyFloat_Pack8(double x, unsigned char *p, int le)
|
|||
return -1;
|
||||
}
|
||||
else {
|
||||
const char *s = (char*)&x;
|
||||
const unsigned char *s = (unsigned char*)&x;
|
||||
int i, incr = 1;
|
||||
|
||||
if ((double_format == ieee_little_endian_format && !le)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue