mirror of
https://github.com/python/cpython
synced 2026-09-28 01:13:17 +03:00
gh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094)
This commit is contained in:
parent
ff4e53cb74
commit
59ea0f523e
13 changed files with 33 additions and 32 deletions
|
|
@ -4060,8 +4060,8 @@ static PyObject *
|
|||
timezone_getinitargs(PyDateTime_TimeZone *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
if (self->name == NULL)
|
||||
return Py_BuildValue("(O)", self->offset);
|
||||
return Py_BuildValue("(OO)", self->offset, self->name);
|
||||
return PyTuple_Pack(1, self->offset);
|
||||
return PyTuple_Pack(2, self->offset, self->name);
|
||||
}
|
||||
|
||||
static PyMethodDef timezone_methods[] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue