diff options
author | Pedro Alves <palves@redhat.com> | 2017-04-05 19:21:35 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-04-05 19:21:35 +0100 |
commit | 4d75997912d77497fd395fde222513436a7df046 (patch) | |
tree | 1e4d20c61eb87f144dbee57e83f677b2b43e09ce /gdb/python/py-objfile.c | |
parent | 21c8a587ab81a58d3e067551d5503a765f00ec6e (diff) | |
download | gdb-4d75997912d77497fd395fde222513436a7df046.zip gdb-4d75997912d77497fd395fde222513436a7df046.tar.gz gdb-4d75997912d77497fd395fde222513436a7df046.tar.bz2 |
-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.
Diffstat (limited to 'gdb/python/py-objfile.c')
0 files changed, 0 insertions, 0 deletions