mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
closes bpo-39859: Do not downcast result of hstrerror (GH-18790)
set_herror builds a string by calling hstrerror but downcasts its return value to char *. It should be const char *. Automerge-Triggered-By: @benjaminp
This commit is contained in:
parent
da4d656e95
commit
e63117a84e
1 changed files with 1 additions and 1 deletions
|
@ -658,7 +658,7 @@ set_herror(int h_error)
|
|||
PyObject *v;
|
||||
|
||||
#ifdef HAVE_HSTRERROR
|
||||
v = Py_BuildValue("(is)", h_error, (char *)hstrerror(h_error));
|
||||
v = Py_BuildValue("(is)", h_error, hstrerror(h_error));
|
||||
#else
|
||||
v = Py_BuildValue("(is)", h_error, "host not found");
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue