This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] -Wwrite-strings: More fix-old-Python-API wrappers
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 05 Apr 2017 20:12:18 -0400
- Subject: [binutils-gdb] -Wwrite-strings: More fix-old-Python-API wrappers
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 4d75997912d77497fd395fde222513436a7df046 ***
Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 4d75997912d77497fd395fde222513436a7df046
-Wwrite-strings: More fix-old-Python-API wrappers
When building against Python 2.7, -Wwrite-strings flags several cases
of passing a string literal to Python functions that expect a "char
*". This commit addresses the issue like we already handle several
other similar cases -- wrap the Python API with our own fixed
version that adds the necessary constification.
gdb/ChangeLog:
2017-04-05 Pedro Alves <palves@redhat.com>
* python/python-internal.h (gdb_PyObject_CallMethod)
(gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
New functions.
(GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
(PySys_GetObject, PySys_SetPath): New macros.