mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
sprintf -> PyOS_snprintf in some "obviously safe" cases.
Also changed <>-style #includes to ""-style in some places where the former didn't make sense.
This commit is contained in:
parent
05bd787c6c
commit
885d457709
15 changed files with 61 additions and 42 deletions
|
@ -370,8 +370,8 @@ static PyObject *
|
|||
generic_repr(genericobject *g)
|
||||
{
|
||||
char buf[100];
|
||||
sprintf(buf, "<FORMS_object at %p, objclass=%d>",
|
||||
g, g->ob_generic->objclass);
|
||||
PyOS_snprintf(buf, sizeof(buf), "<FORMS_object at %p, objclass=%d>",
|
||||
g, g->ob_generic->objclass);
|
||||
return PyString_FromString(buf);
|
||||
}
|
||||
|
||||
|
@ -1580,8 +1580,8 @@ static PyObject *
|
|||
form_repr(formobject *f)
|
||||
{
|
||||
char buf[100];
|
||||
sprintf(buf, "<FORMS_form at %p, window=%ld>",
|
||||
f, f->ob_form->window);
|
||||
PyOS_snprintf(buf, sizeof(buf), "<FORMS_form at %p, window=%ld>",
|
||||
f, f->ob_form->window);
|
||||
return PyString_FromString(buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue