summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_output.py
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@kernel.org>2025-07-30 10:34:20 -0300
committerNamhyung Kim <namhyung@kernel.org>2025-07-30 10:15:17 -0700
commit59edbec7a5c70af6c0058e32eb3750bfb8928d7b (patch)
tree9dda43a030f8ce38a78828aea31ff78e290833e4 /scripts/lib/kdoc/kdoc_output.py
parentb91a9abbf4734d411d304661fbb7e2878281eb51 (diff)
perf python: Stop using deprecated PyUnicode_AsString()
As noticed while building for Fedora 43: GEN /tmp/build/perf/python/perf.cpython-314-x86_64-linux-gnu.so /git/perf-6.16.0-rc3/tools/perf/util/python.c: In function ‘get_tracepoint_field’: /git/perf-6.16.0-rc3/tools/perf/util/python.c:340:9: error: ‘_PyUnicode_AsString’ is deprecated [-Werror=deprecated-declarations] 340 | const char *str = _PyUnicode_AsString(PyObject_Str(attr_name)); | ^~~~~ In file included from /usr/include/python3.14/unicodeobject.h:1022, from /usr/include/python3.14/Python.h:89, from /git/perf-6.16.0-rc3/tools/perf/util/python.c:2: /usr/include/python3.14/cpython/unicodeobject.h:648:1: note: declared here 648 | _PyUnicode_AsString(PyObject *unicode) | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors error: command '/usr/bin/gcc' failed with exit code 1 Use PyUnicode_AsUTF8() instead and also check if PyObject_Str() fails before doing so. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Link: https://lore.kernel.org/r/aIofXNK8QLtLIaI3@x1 Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_output.py')
0 files changed, 0 insertions, 0 deletions