mirror of
https://github.com/python/cpython
synced 2024-10-05 15:14:46 +00:00
Use PyOS_snprintf() instead of sprintf and wrap the long line
This commit is contained in:
parent
5d8d618c95
commit
03b109afc0
|
@ -457,8 +457,10 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v)
|
|||
n = 0;
|
||||
else {
|
||||
char msg[256];
|
||||
sprintf(msg, "must assign sequence (not \"%.200s\") to slice",
|
||||
v->ob_type->tp_name);
|
||||
PyOS_snprintf(msg, sizeof(msg),
|
||||
"must assign sequence"
|
||||
" (not \"%.200s\") to slice",
|
||||
v->ob_type->tp_name);
|
||||
v_as_SF = PySequence_Fast(v, msg);
|
||||
if(v_as_SF == NULL)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue