summaryrefslogtreecommitdiffstats
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-10-20 15:08:41 (GMT)
committerGitHub <noreply@github.com>2023-10-20 15:08:41 (GMT)
commit59ea0f523e155ac1a471cd292b41a76241fccd36 (patch)
tree9d5f216adbc400011f3e7e35c17575a379c735ac /Modules/pyexpat.c
parentff4e53cb747063e95eaec181fd396f062f885ac2 (diff)
downloadcpython-59ea0f523e155ac1a471cd292b41a76241fccd36.zip
cpython-59ea0f523e155ac1a471cd292b41a76241fccd36.tar.gz
cpython-59ea0f523e155ac1a471cd292b41a76241fccd36.tar.bz2
gh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094)
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r--Modules/pyexpat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index bd24523..21579a8 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -895,7 +895,7 @@ static PyObject *
pyexpat_xmlparser_GetBase_impl(xmlparseobject *self)
/*[clinic end generated code: output=2886cb21f9a8739a input=918d71c38009620e]*/
{
- return Py_BuildValue("z", XML_GetBase(self->itself));
+ return conv_string_to_unicode(XML_GetBase(self->itself));
}
/*[clinic input]
@@ -1585,7 +1585,7 @@ static PyObject *
pyexpat_ErrorString_impl(PyObject *module, long code)
/*[clinic end generated code: output=2feae50d166f2174 input=cc67de010d9e62b3]*/
{
- return Py_BuildValue("z", XML_ErrorString((int)code));
+ return conv_string_to_unicode(XML_ErrorString((int)code));
}
/* List of methods defined in the module */